Merge branch 'master' into bugfix/VNC-138_http_header_case_github

This commit is contained in:
matt 2025-05-10 10:41:17 +00:00
commit dc6b5d7462
No known key found for this signature in database
143 changed files with 8055 additions and 2335 deletions

View File

@ -4,8 +4,10 @@ package_name = ARGV.first
DEB_PACKAGE_REGEX = %r!(?<os>[^/]+)/kasmvncserver_.+?_(?<arch>.+?).(?<format>deb)!
RPM_PACKAGE_REGEX = %r!(?<os>[^/]+)/kasmvncserver-.+?\.(?<arch>[^.]+).(?<format>rpm)!
ALPINE_PACKAGE_REGEX = %r!(?<os>[^/]+)/kasmvncserver-(doc-)?.+?-r\d+_(?<arch>[^.]+)\.(?<format>apk)!
if matches = package_name.match(DEB_PACKAGE_REGEX)
elsif matches = package_name.match(ALPINE_PACKAGE_REGEX)
else matches = package_name.match(RPM_PACKAGE_REGEX)
end

View File

@ -3,7 +3,7 @@
is_kasmvnc() {
local package="$1";
echo "$package" | grep -qP 'kasmvncserver(_|-)[0-9]'
echo "$package" | grep -qP 'kasmvncserver(_|-)(doc-)?[0-9]'
}
detect_deb_package_arch() {
@ -27,6 +27,13 @@ fetch_xvnc_md5sum() {
cat DEBIAN/md5sums | grep bin/Xkasmvnc | cut -d' ' -f 1
}
detect_alpine_doc_package() {
is_alpine_doc_package=
if [[ $package =~ kasmvncserver-doc ]]; then
is_alpine_doc_package=1
fi
}
function prepare_upload_filename() {
local package="$1";
@ -44,32 +51,90 @@ function prepare_upload_filename() {
REVISION="_${REVISION}"
fi
detect_alpine_doc_package
if [ -n "$RELEASE_BRANCH" ]; then
export upload_filename="kasmvncserver_${PACKAGE_OS}_${RELEASE_VERSION}${REVISION}_${OS_ARCH}.${PACKAGE_FORMAT}";
export upload_filename="kasmvncserver${is_alpine_doc_package:+_doc}_${PACKAGE_OS}_${RELEASE_VERSION}${REVISION}_${OS_ARCH}.${PACKAGE_FORMAT}";
else
export SANITIZED_BRANCH="$(echo $CI_COMMIT_REF_NAME | sed 's/\//_/g')";
export upload_filename="kasmvncserver_${PACKAGE_OS}_${RELEASE_VERSION}_${SANITIZED_BRANCH}_${CI_COMMIT_SHA:0:6}${REVISION}_${OS_ARCH}.${PACKAGE_FORMAT}";
export upload_filename="kasmvncserver${is_alpine_doc_package:+_doc}_${PACKAGE_OS}_${RELEASE_VERSION}_${SANITIZED_BRANCH}_${CI_COMMIT_SHA:0:6}${REVISION}_${OS_ARCH}.${PACKAGE_FORMAT}";
fi
};
list_files_in_directory() {
local dir="$1"
find "$1" -mindepth 1
}
upload_directory_to_s3() {
local dir_to_upload="$1"
local s3_directory="$2";
local s3_bucket="$3";
for file_to_upload in $(list_files_in_directory "$dir_to_upload"); do
upload_to_s3 "$file_to_upload" "$s3_directory/$file_to_upload" "$s3_bucket"
done
}
prepare_functional_tests_source_and_cd_into_it() {
git clone https://gitlab-ci-token:$CI_JOB_TOKEN@gitlab.com/kasm-technologies/internal/kasmvnc-functional-tests.git
cd kasmvnc-functional-tests
mkdir output && chown 1000:1000 output
mkdir report && chown 1000:1000 report
}
upload_report_to_s3() {
s3_tests_directory="kasmvnc/${CI_COMMIT_SHA}/tests"
upload_directory_to_s3 report "$s3_tests_directory" "$S3_BUCKET"
aws s3 cp report/index.html "s3://${S3_BUCKET}/${s3_tests_directory}/report/index.html" --metadata-directive REPLACE --content-type "text/html"
}
put_report_into_ci_pipeline() {
report_name="Functional%20test%20report"
report_url="https://${S3_BUCKET}.s3.amazonaws.com/${s3_tests_directory}/report/index.html"
curl --request POST --header "PRIVATE-TOKEN:${GITLAB_API_TOKEN}" "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/statuses/${CI_COMMIT_SHA}?state=success&name=${report_name}&target_url=${report_url}"
}
prepare_kasmvnc_built_packages_to_replace_workspaces_image_packages() {
cp -r ../output/jammy output/
}
prepare_to_run_functional_tests() {
install_packages_needed_for_functional_tests
prepare_functional_tests_source_and_cd_into_it
prepare_s3_uploader
prepare_kasmvnc_built_packages_to_replace_workspaces_image_packages
}
install_packages_needed_for_functional_tests() {
export DEBIAN_FRONTEND=noninteractive
apt-get update && apt-get install -y git tree curl docker.io awscli
apt-get install -y ruby3.1 wget
apt-get install -y python3 python3-pip python3-boto3 curl pkg-config libxmlsec1-dev
}
function upload_to_s3() {
local package="$1";
local upload_filename="$2";
local file_to_upload="$1";
local s3_url_for_file="$2";
local s3_bucket="$3";
# Transfer to S3
python3 amazon-s3-bitbucket-pipelines-python/s3_upload.py "${s3_bucket}" "$package" "${upload_filename}";
python3 amazon-s3-bitbucket-pipelines-python/s3_upload.py "$s3_bucket" "$file_to_upload" "$s3_url_for_file";
# Use the Gitlab API to tell Gitlab where the artifact was stored
export S3_URL="https://${s3_bucket}.s3.amazonaws.com/${upload_filename}";
export S3_URL="https://${s3_bucket}.s3.amazonaws.com/${s3_url_for_file}";
};
function prepare_s3_uploader() {
git clone https://bitbucket.org/awslabs/amazon-s3-bitbucket-pipelines-python.git
}
function prepare_to_run_scripts_and_s3_uploads() {
export DEBIAN_FRONTEND=noninteractive;
apt-get update;
apt-get install -y ruby2.7 git wget;
apt-get install -y python3 python3-pip python3-boto3 curl pkg-config libxmlsec1-dev;
git clone https://bitbucket.org/awslabs/amazon-s3-bitbucket-pipelines-python.git;
};
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get install -y ruby2.7 git wget
apt-get install -y python3 python3-pip python3-boto3 curl pkg-config libxmlsec1-dev
prepare_s3_uploader
}
detect_release_branch() {
if echo $CI_COMMIT_REF_NAME | grep -Pq '^release/([\d.]+)$'; then

12
.gitignore vendored
View File

@ -4,6 +4,7 @@
*.lo
.deps
.libs
*.swp
CMakeFiles
CMakeCache.txt
@ -12,6 +13,10 @@ Makefile
Makefile.in
config.h
libjpeg-turbo/
xorg.build/
install_manifest.txt
builder/build/
builder/www/
spec/tmp
@ -23,3 +28,10 @@ debian/kasmvncserver.substvars
debian/kasmvncserver/
.pc
.vscode/
# --run-test artifacts
run_test/
alpine/.abuild/kasmvnc_signing_key.rsa
alpine/.abuild/kasmvnc_signing_key.rsa.pub
alpine/packages/

View File

@ -7,7 +7,7 @@ variables:
GITLAB_SHARED_DIND_DIR: /builds/$CI_PROJECT_PATH/shared
GIT_SUBMODULE_STRATEGY: normal
GIT_FETCH_EXTRA_FLAGS: --tags --force
# E.g. BUILD_JOBS: build_debian_buster,build_ubuntu_bionic. This will include
# E.g. BUILD_JOBS: build_debian_buster,build_ubuntu_focal. This will include
# arm builds, because build_debian_buster_arm matches build_debian_buster.
# "BUILD_JOBS: none" won't build any build jobs, nor www.
BUILD_JOBS: all
@ -22,6 +22,8 @@ workflow:
stages:
- www
- build
- functional_test
- run_test
- test
- upload
@ -29,6 +31,7 @@ stages:
- pwd
- apk add bash
- mkdir -p "$GITLAB_SHARED_DIND_DIR" && chmod 777 "$GITLAB_SHARED_DIND_DIR"
- docker login --username $DOCKER_HUB_USERNAME --password $DOCKER_HUB_PASSWORD
.prepare_www: &prepare_www
- tar -zxf output/www/kasm_www.tar.gz -C builder/
@ -41,6 +44,24 @@ default:
tags:
- oci-fixed-amd
functional_test:
stage: functional_test
image: debian:bookworm
tags:
- oci-fixed-amd
before_script:
- . .ci/upload.sh
script:
- prepare_to_run_functional_tests
- ./functional-test
- upload_report_to_s3
- put_report_into_ci_pipeline
dependencies:
- build_amd64
artifacts:
paths:
- kasmvnc-functional-tests/output/
build_www:
stage: www
allow_failure: false
@ -66,7 +87,7 @@ build_www:
paths:
- output/
build_ubuntu_bionic:
build_amd64:
stage: build
allow_failure: true
tags:
@ -77,17 +98,20 @@ build_ubuntu_bionic:
after_script:
- *prepare_artfacts
script:
- bash builder/build-package ubuntu bionic
- bash builder/build-package $DISTRO;
only:
variables:
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ "$DISTRO"
artifacts:
paths:
- output/
parallel:
matrix:
- DISTRO: [ 'ubuntu focal', 'ubuntu jammy', 'ubuntu noble', 'debian bullseye', 'debian bookworm', 'kali kali-rolling', 'oracle 8', 'oracle 9', 'opensuse 15', 'fedora forty', 'fedora fortyone', 'alpine 318', 'alpine 319', 'alpine 320', 'alpine 321' ]
build_ubuntu_bionic_arm:
build_arm64:
stage: build
allow_failure: false
allow_failure: true
tags:
- oci-fixed-arm
before_script:
@ -96,785 +120,74 @@ build_ubuntu_bionic_arm:
after_script:
- *prepare_artfacts
script:
- bash builder/build-package ubuntu bionic
- bash builder/build-package $DISTRO;
only:
variables:
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ "$DISTRO"
artifacts:
paths:
- output/
parallel:
matrix:
- DISTRO: [ 'ubuntu focal', 'ubuntu jammy', 'ubuntu noble', 'debian bullseye', 'debian bookworm', 'kali kali-rolling', 'oracle 8', 'oracle 9', 'opensuse 15', 'fedora forty', 'fedora fortyone', 'alpine 318', 'alpine 319', 'alpine 320', 'alpine 321' ]
build_ubuntu_focal:
stage: build
allow_failure: true
run_test_amd64:
stage: run_test
tags:
- oci-fixed-amd
before_script:
- *prepare_build
- *prepare_www
after_script:
- *prepare_artfacts
script:
- bash builder/build-package ubuntu focal;
- bash builder/test-barebones --run-test $DISTRO
only:
variables:
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ "$DISTRO"
dependencies:
- build_amd64
artifacts:
paths:
- output/
reports:
junit:
- run_test/*.xml
parallel:
matrix:
- DISTRO: [ 'ubuntu focal', 'ubuntu jammy', 'ubuntu noble', 'debian bullseye', 'debian bookworm', 'kali kali-rolling', 'oracle 8', 'oracle 9', 'opensuse 15', 'fedora forty', 'fedora fortyone', 'alpine 318', 'alpine 319', 'alpine 320', 'alpine 321' ]
build_ubuntu_focal_arm:
stage: build
allow_failure: true
run_test_arm64:
stage: run_test
tags:
- oci-fixed-arm
before_script:
- *prepare_build
- *prepare_www
after_script:
- *prepare_artfacts
script:
- bash builder/build-package ubuntu focal;
- bash builder/test-barebones --run-test $DISTRO
only:
variables:
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ "$DISTRO"
dependencies:
- build_arm64
artifacts:
paths:
- output/
reports:
junit:
- run_test/*.xml
parallel:
matrix:
- DISTRO: [ 'ubuntu focal', 'ubuntu jammy', 'ubuntu noble', 'debian bullseye', 'debian bookworm', 'kali kali-rolling', 'oracle 8', 'oracle 9', 'opensuse 15', 'fedora forty', 'fedora fortyone', 'alpine 318', 'alpine 319', 'alpine 320', 'alpine 321' ]
build_ubuntu_jammy:
stage: build
allow_failure: true
tags:
- oci-fixed-amd
before_script:
- *prepare_build
- *prepare_www
after_script:
- *prepare_artfacts
script:
- bash builder/build-package ubuntu jammy;
only:
variables:
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
artifacts:
paths:
- output/
build_ubuntu_jammy_arm:
stage: build
allow_failure: true
tags:
- oci-fixed-arm
before_script:
- *prepare_build
- *prepare_www
after_script:
- *prepare_artfacts
script:
- bash builder/build-package ubuntu jammy;
only:
variables:
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
artifacts:
paths:
- output/
build_ubuntu_noble:
stage: build
allow_failure: true
tags:
- oci-fixed-amd
before_script:
- *prepare_build
- *prepare_www
after_script:
- *prepare_artfacts
script:
- bash builder/build-package ubuntu noble;
only:
variables:
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
artifacts:
paths:
- output/
build_ubuntu_noble_arm:
stage: build
allow_failure: true
tags:
- oci-fixed-arm
before_script:
- *prepare_build
- *prepare_www
after_script:
- *prepare_artfacts
script:
- bash builder/build-package ubuntu noble;
only:
variables:
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
artifacts:
paths:
- output/
build_debian_buster:
stage: build
allow_failure: true
tags:
- oci-fixed-amd
before_script:
- *prepare_build
- *prepare_www
after_script:
- *prepare_artfacts
script:
- bash builder/build-package debian buster;
only:
variables:
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
artifacts:
paths:
- output/
build_debian_buster_arm:
stage: build
allow_failure: true
tags:
- oci-fixed-arm
before_script:
- *prepare_build
- *prepare_www
after_script:
- *prepare_artfacts
script:
- bash builder/build-package debian buster;
only:
variables:
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
artifacts:
paths:
- output/
build_debian_bullseye:
stage: build
allow_failure: true
tags:
- oci-fixed-amd
before_script:
- *prepare_build
- *prepare_www
after_script:
- *prepare_artfacts
script:
- bash builder/build-package debian bullseye;
only:
variables:
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
artifacts:
paths:
- output/
build_debian_bullseye_arm:
stage: build
allow_failure: true
tags:
- oci-fixed-arm
before_script:
- *prepare_build
- *prepare_www
after_script:
- *prepare_artfacts
script:
- bash builder/build-package debian bullseye;
only:
variables:
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
artifacts:
paths:
- output/
build_debian_bookworm:
stage: build
allow_failure: true
tags:
- oci-fixed-amd
before_script:
- *prepare_build
- *prepare_www
after_script:
- *prepare_artfacts
script:
- bash builder/build-package debian bookworm;
only:
variables:
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
artifacts:
paths:
- output/
build_debian_bookworm_arm:
stage: build
allow_failure: true
tags:
- oci-fixed-arm
before_script:
- *prepare_build
- *prepare_www
after_script:
- *prepare_artfacts
script:
- bash builder/build-package debian bookworm;
only:
variables:
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
artifacts:
paths:
- output/
build_kali_rolling:
stage: build
allow_failure: true
tags:
- oci-fixed-amd
before_script:
- *prepare_build
- *prepare_www
after_script:
- *prepare_artfacts
script:
- bash builder/build-package kali kali-rolling;
only:
variables:
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
artifacts:
paths:
- output/
build_kali_rolling_arm:
stage: build
allow_failure: true
tags:
- oci-fixed-arm
before_script:
- *prepare_build
- *prepare_www
after_script:
- *prepare_artfacts
script:
- bash builder/build-package kali kali-rolling;
only:
variables:
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
artifacts:
paths:
- output/
build_oracle_8:
stage: build
allow_failure: true
tags:
- oci-fixed-amd
before_script:
- *prepare_build
- *prepare_www
after_script:
- *prepare_artfacts
script:
- bash builder/build-package oracle 8;
only:
variables:
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
artifacts:
paths:
- output/
build_oracle_8_arm:
stage: build
allow_failure: true
tags:
- oci-fixed-arm
before_script:
- *prepare_build
- *prepare_www
after_script:
- *prepare_artfacts
script:
- bash builder/build-package oracle 8;
only:
variables:
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
artifacts:
paths:
- output/
build_oracle_9:
stage: build
allow_failure: true
tags:
- oci-fixed-amd
before_script:
- *prepare_build
- *prepare_www
after_script:
- *prepare_artfacts
script:
- bash builder/build-package oracle 9;
only:
variables:
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
artifacts:
paths:
- output/
build_oracle_9_arm:
stage: build
allow_failure: true
tags:
- oci-fixed-arm
before_script:
- *prepare_build
- *prepare_www
after_script:
- *prepare_artfacts
script:
- bash builder/build-package oracle 9;
only:
variables:
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
artifacts:
paths:
- output/
build_opensuse_15:
stage: build
allow_failure: true
tags:
- oci-fixed-amd
before_script:
- *prepare_build
- *prepare_www
after_script:
- *prepare_artfacts
script:
- bash builder/build-package opensuse 15;
only:
variables:
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
artifacts:
paths:
- output/
build_opensuse_15_arm:
stage: build
allow_failure: true
tags:
- oci-fixed-arm
before_script:
- *prepare_build
- *prepare_www
after_script:
- *prepare_artfacts
script:
- bash builder/build-package opensuse 15;
only:
variables:
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
artifacts:
paths:
- output/
build_fedora_thirtyseven:
stage: build
allow_failure: true
tags:
- oci-fixed-amd
before_script:
- *prepare_build
- *prepare_www
after_script:
- *prepare_artfacts
script:
- bash builder/build-package fedora thirtyseven;
only:
variables:
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
artifacts:
paths:
- output/
build_fedora_thirtyseven_arm:
stage: build
allow_failure: true
tags:
- oci-fixed-arm
before_script:
- *prepare_build
- *prepare_www
after_script:
- *prepare_artfacts
script:
- bash builder/build-package fedora thirtyseven;
only:
variables:
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
artifacts:
paths:
- output/
build_fedora_thirtyeight:
stage: build
allow_failure: true
tags:
- oci-fixed-amd
before_script:
- *prepare_build
- *prepare_www
after_script:
- *prepare_artfacts
script:
- bash builder/build-package fedora thirtyeight;
only:
variables:
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
artifacts:
paths:
- output/
build_fedora_thirtyeight_arm:
stage: build
allow_failure: true
tags:
- oci-fixed-arm
before_script:
- *prepare_build
- *prepare_www
after_script:
- *prepare_artfacts
script:
- bash builder/build-package fedora thirtyeight;
only:
variables:
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
artifacts:
paths:
- output/
build_fedora_thirtynine:
stage: build
allow_failure: true
tags:
- oci-fixed-amd
before_script:
- *prepare_build
- *prepare_www
after_script:
- *prepare_artfacts
script:
- bash builder/build-package fedora thirtynine;
only:
variables:
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
artifacts:
paths:
- output/
build_fedora_thirtynine_arm:
stage: build
allow_failure: true
tags:
- oci-fixed-arm
before_script:
- *prepare_build
- *prepare_www
after_script:
- *prepare_artfacts
script:
- bash builder/build-package fedora thirtynine;
only:
variables:
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
artifacts:
paths:
- output/
build_fedora_forty:
stage: build
allow_failure: true
tags:
- oci-fixed-amd
before_script:
- *prepare_build
- *prepare_www
after_script:
- *prepare_artfacts
script:
- bash builder/build-package fedora forty;
only:
variables:
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
artifacts:
paths:
- output/
build_fedora_forty_arm:
stage: build
allow_failure: true
tags:
- oci-fixed-arm
before_script:
- *prepare_build
- *prepare_www
after_script:
- *prepare_artfacts
script:
- bash builder/build-package fedora forty;
only:
variables:
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
artifacts:
paths:
- output/
build_fedora_fortyone:
stage: build
allow_failure: true
tags:
- oci-fixed-amd
before_script:
- *prepare_build
- *prepare_www
after_script:
- *prepare_artfacts
script:
- bash builder/build-package fedora fortyone;
only:
variables:
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
artifacts:
paths:
- output/
build_fedora_fortyone_arm:
stage: build
allow_failure: true
tags:
- oci-fixed-arm
before_script:
- *prepare_build
- *prepare_www
after_script:
- *prepare_artfacts
script:
- bash builder/build-package fedora fortyone;
only:
variables:
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
artifacts:
paths:
- output/
build_alpine_317:
stage: build
allow_failure: true
tags:
- oci-fixed-amd
before_script:
- *prepare_build
- *prepare_www
after_script:
- *prepare_artfacts
script:
- bash builder/build-package alpine 317;
only:
variables:
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
artifacts:
paths:
- output/
build_alpine_317_arm:
stage: build
allow_failure: true
tags:
- oci-fixed-arm
before_script:
- *prepare_build
- *prepare_www
after_script:
- *prepare_artfacts
script:
- bash builder/build-package alpine 317;
only:
variables:
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
artifacts:
paths:
- output/
test:
spec_test:
stage: test
tags:
- oci-fixed-amd
- kasmvnc-x86
before_script:
- *prepare_build
artifacts:
reports:
junit:
- SelfBench.xml
- Benchmark.xml
script:
- bash builder/test-vncserver
build_alpine_318:
stage: build
allow_failure: true
tags:
- oci-fixed-amd
before_script:
- *prepare_build
- *prepare_www
after_script:
- *prepare_artfacts
script:
- bash builder/build-package alpine 318;
only:
variables:
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
artifacts:
paths:
- output/
build_alpine_318_arm:
stage: build
allow_failure: true
tags:
- oci-fixed-arm
before_script:
- *prepare_build
- *prepare_www
after_script:
- *prepare_artfacts
script:
- bash builder/build-package alpine 318;
only:
variables:
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
artifacts:
paths:
- output/
build_alpine_319:
stage: build
allow_failure: true
tags:
- oci-fixed-amd
before_script:
- *prepare_build
- *prepare_www
after_script:
- *prepare_artfacts
script:
- bash builder/build-package alpine 319;
only:
variables:
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
artifacts:
paths:
- output/
build_alpine_319_arm:
stage: build
allow_failure: true
tags:
- oci-fixed-arm
before_script:
- *prepare_build
- *prepare_www
after_script:
- *prepare_artfacts
script:
- bash builder/build-package alpine 319;
only:
variables:
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
artifacts:
paths:
- output/
build_alpine_320:
stage: build
allow_failure: true
tags:
- oci-fixed-amd
before_script:
- *prepare_build
- *prepare_www
after_script:
- *prepare_artfacts
script:
- bash builder/build-package alpine 320;
only:
variables:
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
artifacts:
paths:
- output/
build_alpine_320_arm:
stage: build
allow_failure: true
tags:
- oci-fixed-arm
before_script:
- *prepare_build
- *prepare_www
after_script:
- *prepare_artfacts
script:
- bash builder/build-package alpine 320;
only:
variables:
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
artifacts:
paths:
- output/
build_alpine_321:
stage: build
allow_failure: true
tags:
- oci-fixed-amd
before_script:
- *prepare_build
- *prepare_www
after_script:
- *prepare_artfacts
script:
- bash builder/build-package alpine 321;
only:
variables:
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
artifacts:
paths:
- output/
build_alpine_321_arm:
stage: build
allow_failure: true
tags:
- oci-fixed-arm
before_script:
- *prepare_build
- *prepare_www
after_script:
- *prepare_artfacts
script:
- bash builder/build-package alpine 321;
only:
variables:
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
artifacts:
paths:
- output/
upload:
stage: upload
image: ubuntu:focal
@ -900,7 +213,7 @@ upload:
- export S3_BUILD_DIRECTORY="kasmvnc/${CI_COMMIT_SHA}"
- export RELEASE_VERSION=$(.ci/next_release_version "$CI_COMMIT_REF_NAME")
- uploaded_files=()
- for package in `find output/ -type f -name '*.deb' -or -name '*.rpm' -or -name '*.tgz'`; do
- for package in `find output/ -type f -name '*.deb' -or -name '*.rpm' -or -name '*.apk'`; do
prepare_upload_filename "$package";
upload_filename="${S3_BUILD_DIRECTORY}/$upload_filename";
echo;

2
.gitmodules vendored
View File

@ -1,4 +1,4 @@
[submodule "kasmweb"]
path = kasmweb
url = https://github.com/kasmtech/noVNC.git
branch = release/1.2.2
branch = release/1.2.3

View File

@ -48,7 +48,7 @@ Build Requirements (Windows)
You also need the Inno Setup Preprocessor, which is available in the
Inno Setup QuickStart Pack.
Add the directory containing iscc.exe (for instance,
Add the directory containing iscc.exe (for instance,
C:\Program Files\Inno Setup 5) to the system or user PATH environment
variable prior to building KasmVNC.
@ -71,6 +71,67 @@ For in-tree builds, these directories are the same.
Building KasmVNC
=================
Building the KasmVNC Server using Docker
----------------------------------------
```bash
git submodule init
git submodule update --remote --merge
sudo docker build -t kasmvnc:dev -f builder/dockerfile.ubuntu_jammy.dev .
sudo docker run -it --rm -v ./:/src -p 6901:6901 -p 8443:8443 --name kasmvnc_dev kasmvnc:dev
```
Now from inside the container.
```bash
# build frontend
cd kasmweb
npm install
npm run build # <-- only run this on subsequent changes to front-end code
cd ..
# build dependencies, this is optional as they are pre-built in the docker image. Only rebuild if you made version changes and need to test.
# sudo builder/scripts/build-webp
# sudo builder/scripts/build-libjpeg-turbo
# Build KasmVNC
builder/build.sh
```
Now run Xvnc and Xfce4 from inside the container
```bash
/src/xorg.build/bin/Xvnc -interface 0.0.0.0 -PublicIP 127.0.0.1 -disableBasicAuth -RectThreads 0 -Log *:stdout:100 -httpd /src/kasmweb/dist -sslOnly 0 -SecurityTypes None -websocketPort 6901 :1 &
/usr/bin/xfce4-session --display :1
```
Now open a browser and navigate to your dev VM on port 6901.
Running noVNC from source
-------------------------
If you need to debug or make changes to the UI code, use the following procedures to use npm to serve the web code. The code will automatically rebuild when changes are made and the code will not be packaged.
These steps assume you are inside the kasmvnc:dev container started in the above steps.
Now from inside the container. **This assumes KasmVNC is already built, follow steps above if you need to build KasmVNC**
```bash
# Run KasmVNC
/src/xorg.build/bin/Xvnc -interface 0.0.0.0 -PublicIP 127.0.0.1 -disableBasicAuth -RectThreads 0 -Log *:stdout:100 -httpd /src/kasmweb/dist -sslOnly 0 -SecurityTypes None -websocketPort 6901 :1 &
/usr/bin/xfce4-session --display :1 &
sudo nginx
cd kasmweb
npm install # only needs done first time
npm run serve # <-- Needs to run in foreground
```
Now open a browser and navigate to your dev VM on port 8443 over https.
NGINX is proxying the websocket to KasmVNC and all other requests go to the node server. NGINX listens on 8443 with ssl.
Since `npm run serve` needs to run in the foreground, you may need to exec into the container from another terminal to run additional commands like stopping Xvnc, rebuilding KasmVNC, etc.
```bash
sudo docker exec -it kasmvnc_dev /bin/bash
```
Building the KasmVNC Server on Modern Unix/Linux Systems
---------------------------------------------------------
@ -90,7 +151,7 @@ but the general outline is as follows.
> cp -R {xorg_source}/* unix/xserver/
(NOTE: {xorg_source} is the directory containing the Xorg source for the
machine on which you are building KasmVNC. The most recent versions of
Red Hat/CentOS/Fedora, for instance, provide an RPM called
Red Hat/Fedora, for instance, provide an RPM called
"xorg-x11-server-source", which installs the Xorg source under
/usr/share/xorg-x11-server-source.)
@ -113,8 +174,8 @@ but the general outline is as follows.
--with-serverconfig-path=/usr/lib[64]/xorg \
--with-dri-driver-path=/usr/lib[64]/dri \
{additional configure options}
(NOTE: This is merely an example that works with Red Hat Enterprise/CentOS
6 and recent Fedora releases. You should customize it for your particular
(NOTE: This is merely an example that works with Red Hat Enterprise
and recent Fedora releases. You should customize it for your particular
system. In particular, it will be necessary to customize the font, XKB,
and DRI directories.)
@ -187,7 +248,7 @@ Building TLS Support
======================================
TLS requires GnuTLS, which is supplied with most Linux distributions and
with MinGW for Windows and can be built from source on OS X and other
with MinGW for Windows and can be built from source on OS X and other
Unix variants. However, GnuTLS versions > 2.12.x && < 3.3.x should be
avoided because of potential incompatibilities during initial handshaking.
@ -314,7 +375,7 @@ X server source (for instance, --host=i686-pc-linux-gnu).
Add
-DCMAKE_OSX_SYSROOT=/Developer/SDKs/MacOSX10.5.sdk \
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.5
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.5
to the CMake command line. The OS X 10.5 SDK must be installed.
@ -406,7 +467,7 @@ Distribution-Specific Packaging
===============================
RPM Packages for RHEL / CentOS
RPM Packages for RHEL
------------------------------
The RPM spec files and patches used to create the nightly builds

View File

@ -21,7 +21,7 @@ include(CheckCSourceRuns)
include(CMakeMacroLibtoolFile)
project(kasmvnc)
project(kasmvnc LANGUAGES C CXX)
set(VERSION 0.9)
# The RC version must always be four comma-separated numbers
@ -74,13 +74,10 @@ set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} -UNDEBUG")
# Make sure we get a sane C version
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99")
set(CMAKE_CXX_STANDARD 20)
# Enable OpenMP
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fopenmp")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp")
# Enable C++ 11
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
# Tell the compiler to be stringent
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wformat=2")
@ -230,6 +227,7 @@ include_directories(${CMAKE_BINARY_DIR})
include(cmake/StaticBuild.cmake)
add_subdirectory(third_party)
add_subdirectory(common)
if(WIN32)
@ -242,11 +240,12 @@ else()
endif()
if(ENABLE_NLS)
add_subdirectory(po)
add_subdirectory(po)
endif()
add_subdirectory(tests)
if (TESTS)
add_subdirectory(tests)
endif()
include(cmake/BuildPackages.cmake)

View File

@ -1,6 +1,6 @@
# KasmVNC - Linux Web Remote Desktop
<a href="https://kasmweb.com"><img src="https://kasm-static-content.s3.amazonaws.com/logo_kasm.png" width="300"><a/>
<a href="https://kasmweb.com"><img src="https://5856039.fs1.hubspotusercontent-na1.net/hubfs/5856039/kasmvnc_logo.png" width="300"><a/>
KasmVNC provides remote web-based access to a Desktop or application. While VNC is in the name, KasmVNC differs from other VNC variants such as TigerVNC, RealVNC, and TurboVNC. KasmVNC has broken from the RFB specification which defines VNC, in order to support modern technologies and increase security. KasmVNC is accessed by users from any modern browser and does not support legacy VNC viewer applications. KasmVNC uses a modern YAML based configuration at the server and user level, allowing for ease of management.
@ -10,7 +10,7 @@ KasmVNC provides remote web-based access to a Desktop or application. While VNC
**Do not use the README from the master branch**, unless you are compiling KasmVNC yourself from the tip of master. Use the documentation for your specific release.
- [KasmVNC 1.0.0 Documentation](https://www.kasmweb.com/kasmvnc/docs/1.0.0/index.html)
- [KasmVNC Documentation](https://www.kasmweb.com/kasmvnc/docs/latest/index.html)
For beta releases prior to version 1.0.0, use the README in this github project on the tagged commit for that release.
@ -46,22 +46,6 @@ sudo dnf localinstall ./kasmvncserver_*.rpm
sudo usermod -a -G kasmvnc-cert $USER
```
### CentOS 7
```sh
# Please choose the package for your distro here (under Assets):
# https://github.com/kasmtech/KasmVNC/releases
wget <package_url>
# Ensure KasmVNC dependencies are available
sudo yum install epel-release
sudo yum install ./kasmvncserver_*.rpm
# Add your user to the kasmvnc-cert group
sudo usermod -a -G kasmvnc-cert $USER
```
## Getting Started
The following examples provide basic usage of KasmVNC with the tools provided. For full documentation on all the utilities and the runtime environment, see our [KasmVNC Documentation](https://www.kasmweb.com/kasmvnc/docs/latest/index.html)
@ -250,7 +234,7 @@ command_line:
- Keyboard input rate limit
- Screen region selection
- Deb packages for Debian, Ubuntu, and Kali Linux included in release.
- RPM packages for CentOS, Oracle, OpenSUSE, Fedora. RPM packages are currently not updatable and not released, though you can build and install them. See build documentation.
- RPM packages for Oracle, OpenSUSE, Fedora. RPM packages are currently not updatable and not released, though you can build and install them. See build documentation.
- Web [API](https://github.com/kasmtech/KasmVNC/wiki/API) added for remotely controlling and getting information from KasmVNC
- Multi-User support with permissions that can be changed via the API
- Web UI uses a webpack for faster load times.

View File

@ -0,0 +1,2 @@
PACKAGER="Kasm Technologies LLC <info@kasmweb.com>"
PACKAGER_PRIVKEY="/src/alpine/.abuild/kasmvnc_signing_key.rsa"

View File

@ -0,0 +1,11 @@
FROM alpine:3.21
RUN apk add abuild sudo less
ENV HOME /src
WORKDIR /src/kasmvncserver
RUN adduser --disabled-password docker
RUN adduser docker abuild
RUN echo "docker ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
USER docker

8
alpine/apk-del-add Executable file
View File

@ -0,0 +1,8 @@
#!/bin/sh
set -e
sudo apk del kasmvncserver || true
rm -r ../packages
abuild -r || true
sudo apk add ../packages/src/x86_64/kasmvncserver-1.3.3-r0.apk --allow-untrusted

1
alpine/build Executable file
View File

@ -0,0 +1 @@
docker build -f alpine-devenv.dockerfile -t alpine-devenv .

View File

@ -0,0 +1,120 @@
#!/bin/bash
# Contributor:
# Maintainer: Kasm Technologies LLC <info@kasmweb.com>
pkgname=kasmvncserver
pkgver=1.3.4
pkgrel=0
pkgdesc="KasmVNC provides remote web-based access to a Desktop or application."
url="https://github.com/kasmtech/KasmVNC"
arch="x86_64 aarch64"
license="GPL-2.0-or-later"
depends="
bash
libgomp
libjpeg-turbo
libwebp
libxfont2
libxshmfence
libxtst
mcookie
mesa-gbm
openssl
pciutils-libs
perl
perl-datetime
perl-hash-merge-simple
perl-list-moreutils
perl-switch
perl-try-tiny
perl-yaml-tiny
perl-datetime
perl-datetime-timezone
pixman
py3-xdg
setxkbmap
xauth
xf86-video-amdgpu
xf86-video-ati
xf86-video-nouveau
xkbcomp
xkeyboard-config
xterm
"
if [ $(arch) = x86_64 ]; then
depends="$depends xf86-video-intel"
fi
makedepends="
rsync
binutils
mesa-gl
libxcursor
gzip
"
checkdepends=""
install="$pkgname.post-install $pkgname.post-deinstall"
subpackages="$pkgname-doc"
source=""
builddir="$srcdir/"
build() {
local alpine_version=$(cat /etc/alpine-release | awk -F. '{ print $1$2 }')
tar -xzf "/src/builder/build/kasmvnc.alpine_$alpine_version.tar.gz" -C "$srcdir";
}
check() {
# Replace with proper check command(s).
# Remove and add !check option if there is no check command.
:
}
package() {
export SRC="$srcdir/usr/local";
export SRC_BIN="$SRC/bin";
export DESTDIR="$pkgdir";
echo "installing files";
mkdir -p $DESTDIR/usr/bin $DESTDIR/usr/lib \
$DESTDIR/usr/share/perl5/vendor_perl $DESTDIR/etc/kasmvnc;
cp $SRC_BIN/Xvnc $DESTDIR/usr/bin/Xkasmvnc;
cd $DESTDIR/usr/bin/ && ln -s Xkasmvnc Xvnc;
cp $SRC_BIN/vncserver $DESTDIR/usr/bin/kasmvncserver;
cd $DESTDIR/usr/bin/ && ln -s kasmvncserver vncserver;
cp -r $SRC_BIN/KasmVNC $DESTDIR/usr/share/perl5/vendor_perl;
cp $SRC_BIN/vncconfig $DESTDIR/usr/bin/kasmvncconfig;
cp $SRC_BIN/kasmvncpasswd $DESTDIR/usr/bin/;
cd $DESTDIR/usr/bin/ && ln -s kasmvncpasswd vncpasswd;
cp $SRC_BIN/kasmxproxy $DESTDIR/usr/bin/;
cp -r $SRC/lib/kasmvnc/ $DESTDIR/usr/lib/kasmvncserver;
rsync -r --links --safe-links --exclude '.git*' --exclude po2js \
--exclude xgettext-html --exclude www/utils/ --exclude .eslintrc \
$SRC/share/kasmvnc $DESTDIR/usr/share;
sed -i -e 's!pem_certificate: .\+$!pem_certificate: /etc/ssl/private/kasmvnc.pem!' \
$DESTDIR/usr/share/kasmvnc/kasmvnc_defaults.yaml
sed -i -e 's!pem_key: .\+$!pem_key: /etc/ssl/private/kasmvnc.pem!' \
$DESTDIR/usr/share/kasmvnc/kasmvnc_defaults.yaml
sed -e 's/^\([^#]\)/# \1/' $SRC/share/kasmvnc/kasmvnc_defaults.yaml > \
$DESTDIR/etc/kasmvnc/kasmvnc.yaml;
}
doc() {
set -e
export SRC="$srcdir/usr/local";
export SRC_BIN="$SRC/bin";
export DESTDIR="$subpkgdir";
export DST_MAN="$DESTDIR/usr/share/man/man1";
mkdir -p $DESTDIR/usr/share/man/man1 \
$DESTDIR/usr/share/doc/kasmvncserver
cp -r $SRC/share/doc/kasmvnc*/* $DESTDIR/usr/share/doc/kasmvncserver/
cp $SRC/man/man1/Xvnc.1 $DESTDIR/usr/share/man/man1/Xkasmvnc.1
cp $SRC/share/man/man1/vncserver.1 $DST_MAN/kasmvncserver.1
cp $SRC/share/man/man1/kasmxproxy.1 $DST_MAN/kasmxproxy.1
cp $SRC/share/man/man1/vncpasswd.1 $DST_MAN/kasmvncpasswd.1
cp $SRC/share/man/man1/vncconfig.1 $DST_MAN/kasmvncconfig.1
gzip -9 $DST_MAN/*
cd $DST_MAN && ln -s Xkasmvnc.1.gz Xvnc.1.gz && \
ln -s kasmvncserver.1.gz vncserver.1.gz && \
ln -s kasmvncpasswd.1.gz vncpasswd.1.gz
}

View File

@ -0,0 +1,3 @@
#!/bin/sh
rm -f /etc/ssl/private/kasmvnc.pem

View File

@ -0,0 +1,26 @@
#!/bin/bash
set -e
kasmvnc_group="kasmvnc-cert"
create_kasmvnc_group() {
if ! getent group "$kasmvnc_group" >/dev/null; then
addgroup --system "$kasmvnc_group"
fi
}
make_self_signed_certificate() {
local cert_file=/etc/ssl/private/kasmvnc.pem
[ -f "$cert_file" ] && return 0
openssl req -x509 -nodes -days 3650 -newkey rsa:2048 \
-keyout "$cert_file" \
-out "$cert_file" -subj \
"/C=US/ST=VA/L=None/O=None/OU=DoFu/CN=kasm/emailAddress=none@none.none"
chgrp "$kasmvnc_group" "$cert_file"
chmod 640 "$cert_file"
}
create_kasmvnc_group
make_self_signed_certificate

View File

@ -7,7 +7,7 @@ Docker CE
# os_codename is what "lsb_release -c" outputs, e.g. buster, focal.
#
# build_tag allows building multiple versions of deb package (rpm not supported)
# targeting a single distro release (e.g. Ubuntu Bionic). If build_tag is given,
# targeting a single distro release (e.g. Ubuntu Focal). If build_tag is given,
# the package name will include build_tag as part of Debian revision. For
# example:
# * with build_tag: kasmvncserver_0.9.1~beta-1+libjpeg-turbo-latest_amd64.deb
@ -16,19 +16,17 @@ Docker CE
#
# Packages will be placed under builder/build/
builder/build-package ubuntu bionic
builder/build-package ubuntu focal
builder/build-package debian buster
builder/build-package debian bullseye
builder/build-package kali kali-rolling
builder/build-package centos core # CentOS 7
builder/build-package fedora thirtythree
```
# Build and test a package
```
builder/build-and-test-deb ubuntu focal
builder/build-and-test-rpm centos core
builder/build-and-test-rpm oracle 8
```
Open browser and point to https://localhost:443/ or https://\<ip-address\>:443/
@ -118,7 +116,7 @@ locally by doing stuff like this:
```
bash -c '
. .ci/upload.sh;
prepare_upload_filename "bionic/kasmvncserver_0.9.1~beta-1+libjpeg-turbo-latest_amd64.deb";
prepare_upload_filename "focal/kasmvncserver_0.9.1~beta-1+libjpeg-turbo-latest_amd64.deb";
echo $upload_filename;'
```
@ -178,7 +176,7 @@ These instructions assume KasmVNC has been cloned at $HOME and ```kasm_www.tar.g
cd ~
tar -zxf kasm_www.tar.gz -C KasmVNC/builder/
cd KasmVNC
sudo builder/build-package ubuntu bionic
sudo builder/build-package ubuntu focal
```
The resulting deb package can be found under ~/KasmVNC/builder/build/bionic
Replace ```bionic``` with ```focal``` to build for Ubuntu 20.04LTS. At this time, only Ubuntu Bionic has been tested, however, other Debian based builds we support should also work.
The resulting deb package can be found under ~/KasmVNC/builder/build/focal
Replace ```focal``` with ```noble``` to build for Ubuntu 24.04LTS.

View File

@ -2,16 +2,35 @@
set -e
copy_signing_key_to_user_abuild_dir() {
docker run --rm -v $PWD/alpine/.abuild:/abuild --user $L_UID:$L_GID \
$builder_image \
cp /etc/apk/keys/kasmvnc_signing_key.rsa.pub \
/etc/apk/keys/kasmvnc_signing_key.rsa /abuild
}
. builder/os_ver_cli.sh
cd "$(dirname "$0")/.."
docker build -t kasmvnc_apkbuilder_${os}:${os_codename} -f \
builder/dockerfile.${os}_${os_codename}.apk.build .
source_dir=$(echo $PWD)
L_UID=$(id -u)
L_GID=$(id -g)
ABUILD_GID=300
if [ "$L_UID" = 0 ]; then
L_UID=1000
L_GID=1000
fi
builder_image=kasmvnc_apkbuilder_${os}:${os_codename}
docker build -t $builder_image \
--build-arg KASMVNC_ALPINE_PRIVATE_KEY \
--build-arg KASMVNC_ALPINE_PUBLIC_KEY \
-f builder/dockerfile.${os}_${os_codename}.apk.build .
copy_signing_key_to_user_abuild_dir
source_dir=$(echo $PWD)
docker run --rm -v "$source_dir":/src --user $L_UID:$L_GID \
--group-add $ABUILD_GID \
-e CI \
kasmvnc_apkbuilder_${os}:${os_codename} /bin/bash -c \
'/src/builder/build-apk-inside-docker'

View File

@ -2,10 +2,27 @@
set -e
add_arch_to_apk_package() {
local package_name="$1"
new_package_name=$(echo "$package_name" | sed -e 's/\(-r[[:digit:]]\+\)/\1_'$(arch)/)
$sudo_cmd mv "$package_name" "$new_package_name"
}
add_arch_to_apk_packages() {
for package_name in $(ls *.apk); do
add_arch_to_apk_package "$package_name"
done
}
os=alpine
os_codename=$(cat /etc/os-release | awk '/VERSION_ID/' | grep -o '[[:digit:]]' | tr -d '\n' | head -c 3)
apkbuild_dir=/src/alpine/kasmvncserver/
mkdir -p /src/builder/build/${os}_${os_codename}
mv \
/src/builder/build/kasmvnc.${os}_${os_codename}.tar.gz \
/src/builder/build/${os}_${os_codename}/kasmvnc.${os}_${os_codename}_$(uname -m).tgz
cd "$apkbuild_dir" && abuild -r
[ -n "$CI" ] && sudo_cmd=sudo || sudo_cmd=
$sudo_cmd mkdir -p /src/builder/build/${os}_${os_codename}
( cd /src/alpine/packages/alpine/$(arch)/ && add_arch_to_apk_packages )
$sudo_cmd mv \
/src/alpine/packages/alpine/$(arch)/*.apk /src/builder/build/${os}_${os_codename}/

View File

@ -6,14 +6,7 @@ os="$1"
codename="$2"
build_tag="$3"
detect_package_format() {
package_format=rpm
if ls builder/dockerfile*"$os"* | grep -q .deb.build; then
package_format=deb
elif ls builder/dockerfile*"$os"* | grep -q .apk.build; then
package_format=apk
fi
}
. ./builder/common.sh
warn_build_tag_not_supported_for_rpm_and_exit() {
if [[ "$build_tag" && "$package_format" = "rpm" ]]; then

View File

@ -9,13 +9,6 @@ detect_quilt() {
fi
}
ensure_crashpad_can_fetch_line_number_by_address() {
if [ ! -f /etc/centos-release ]; then
export LDFLAGS="$LDFLAGS -no-pie"
fi
}
fail_on_gcc_12() {
if [[ -n "$CC" && -n "$CXX" ]]; then
return;
@ -51,49 +44,47 @@ if [[ "${XORG_VER}" == 21* ]]; then
else
XORG_PATCH=$(echo "$XORG_VER" | grep -Po '^\d.\d+' | sed 's#\.##')
fi
wget --no-check-certificate https://www.x.org/archive/individual/xserver/xorg-server-${XORG_VER}.tar.gz
TARBALL="xorg-server-${XORG_VER}.tar.gz"
if [ ! -f "$TARBALL" ]; then
wget --no-check-certificate https://www.x.org/archive/individual/xserver/"$TARBALL"
fi
#git clone https://kasmweb@bitbucket.org/kasmtech/kasmvnc.git
#cd kasmvnc
#git checkout dynjpeg
cd /src
# We only want the server, so FLTK and manual tests aren't useful.
# Alternatively, install fltk 1.3 and its dev packages.
sed -i -e '/find_package(FLTK/s@^@#@' \
-e '/add_subdirectory(tests/s@^@#@' \
CMakeLists.txt
cmake -D CMAKE_BUILD_TYPE=RelWithDebInfo . -DBUILD_VIEWER:BOOL=OFF \
-DENABLE_GNUTLS:BOOL=OFF
make -j5
make -j"$(nproc)"
tar -C unix/xserver -xf /tmp/xorg-server-${XORG_VER}.tar.gz --strip-components=1
if [ ! -d unix/xserver/include ]; then
tar -C unix/xserver -xf /tmp/"$TARBALL" --strip-components=1
cd unix/xserver
# Apply patches
patch -Np1 -i ../xserver${XORG_PATCH}.patch
case "$XORG_VER" in
1.20.*)
patch -s -p0 < ../CVE-2022-2320-v1.20.patch
if [ -f ../xserver120.7.patch ]; then
patch -Np1 -i ../xserver120.7.patch
fi ;;
1.19.*)
patch -s -p0 < ../CVE-2022-2320-v1.19.patch
;;
esac
cd unix/xserver
# Apply patches
patch -Np1 -i ../xserver"${XORG_PATCH}".patch
case "$XORG_VER" in
1.20.*)
patch -s -p0 < ../CVE-2022-2320-v1.20.patch
if [ -f ../xserver120.7.patch ]; then
patch -Np1 -i ../xserver120.7.patch
fi ;;
1.19.*)
patch -s -p0 < ../CVE-2022-2320-v1.19.patch
;;
esac
else
cd unix/xserver
fi
autoreconf -i
# Configuring Xorg is long and has many distro-specific paths.
# The distro paths start after prefix and end with the font path,
# everything after that is based on BUILDING.txt to remove unneeded
# components.
ensure_crashpad_can_fetch_line_number_by_address
# Centos7 is too old for dri3
if [ ! "${KASMVNC_BUILD_OS}" == "centos" ]; then
CONFIG_OPTIONS="--enable-dri3"
fi
# remove gl check for opensuse
if [ "${KASMVNC_BUILD_OS}" == "opensuse" ] || ([ "${KASMVNC_BUILD_OS}" == "oracle" ] && [ "${KASMVNC_BUILD_OS_CODENAME}" == 9 ]); then
sed -i 's/LIBGL="gl >= 7.1.0"/LIBGL="gl >= 1.1"/g' configure
@ -122,33 +113,38 @@ fi
--with-sha1=libcrypto \
--with-xkb-bin-directory=/usr/bin \
--with-xkb-output=/var/lib/xkb \
--with-xkb-path=/usr/share/X11/xkb ${CONFIG_OPTIONS}
--with-xkb-path=/usr/share/X11/xkb "${CONFIG_OPTIONS}"
# remove array bounds errors for new versions of GCC
find . -name "Makefile" -exec sed -i 's/-Werror=array-bounds//g' {} \;
make -j5
make -j"$(nproc)"
# modifications for the servertarball
cd /src
mkdir -p xorg.build/bin
mkdir -p xorg.build/lib
cd xorg.build/bin/
ln -s /src/unix/xserver/hw/vnc/Xvnc Xvnc
ln -sfn /src/unix/xserver/hw/vnc/Xvnc Xvnc
cd ..
mkdir -p man/man1
touch man/man1/Xserver.1
cp /src/unix/xserver/hw/vnc/Xvnc.man man/man1/Xvnc.1
mkdir lib
mkdir -p lib
cd lib
if [ -d /usr/lib/x86_64-linux-gnu/dri ]; then
ln -s /usr/lib/x86_64-linux-gnu/dri dri
ln -sfn /usr/lib/x86_64-linux-gnu/dri dri
elif [ -d /usr/lib/aarch64-linux-gnu/dri ]; then
ln -s /usr/lib/aarch64-linux-gnu/dri dri
ln -sfn /usr/lib/aarch64-linux-gnu/dri dri
elif [ -d /usr/lib/arm-linux-gnueabihf/dri ]; then
ln -s /usr/lib/arm-linux-gnueabihf/dri dri
ln -sfn /usr/lib/arm-linux-gnueabihf/dri dri
elif [ -d /usr/lib/xorg/modules/dri ]; then
ln -s /usr/lib/xorg/modules/dri dri
ln -sfn /usr/lib/xorg/modules/dri dri
else
ln -s /usr/lib64/dri dri
ln -sfn /usr/lib64/dri dri
fi
cd /src

View File

@ -1,18 +1,10 @@
#!/bin/bash
#!/bin/sh
# clear previous build
rm -rf /build/*
# build webpack
npm run build
# remove node stuff from directory
rm -rf node_modules/
# copy all to build dir
cp -R ./* /build/
# remove unneccesary files
cd /build
rm *.md
rm AUTHORS
rm vnc.html
ln -s index.html vnc.html
# copy all to build dir
cp -R ./dist/* /build/

View File

@ -7,6 +7,11 @@ update_version_to_meet_packaging_standards() {
sed -e 's/\([0-9]\)-\([a-zA-Z]\)/\1~\2/')
}
bump_apk() {
builder/bump-package-version-apk "$new_version"
}
bump_rpm() {
builder/bump-package-version-rpm "$new_version"
}
@ -33,3 +38,4 @@ update_version_to_meet_packaging_standards
bump_xvnc_binary
bump_rpm
bump_deb
bump_apk

View File

@ -0,0 +1,13 @@
#!/bin/bash
set -eo pipefail
new_version="$1"
spec_file=alpine/kasmvncserver/APKBUILD
bump_version() {
sed -i "s/^pkgver=.\+/pkgver=$new_version/" "$1"
sed -i "s/^pkgrel=.\+/pkgrel=0/" "$1"
}
bump_version $spec_file

View File

@ -3,7 +3,7 @@
set -eo pipefail
new_version="$1"
spec_dirs=(centos oracle opensuse fedora)
spec_dirs=(oracle opensuse fedora)
spec_files() {
for d in "${spec_dirs[@]}"; do

View File

@ -1 +1,24 @@
VNC_PORT=8443
detect_build_dir() {
if [ -n "$CI" ]; then
build_dir=output
else
build_dir=builder/build
fi
}
detect_interactive() {
if [ -z "$run_test" ]; then
interactive=-it
fi
}
detect_package_format() {
package_format=rpm
if ls builder/dockerfile*"$os"* | grep -q .deb.build; then
package_format=deb
elif ls builder/dockerfile*"$os"* | grep -q .apk.build; then
package_format=apk
fi
}

View File

@ -0,0 +1,42 @@
server {
listen 8443 ssl;
ssl_certificate /etc/ssl/certs/ssl-cert-snakeoil.pem;
ssl_certificate_key /etc/ssl/private/ssl-cert-snakeoil.key;
location / {
proxy_pass http://127.0.0.1:5173;
}
location /api/ {
proxy_pass https://127.0.0.1:6901;
}
location /websockify {
# The following configurations must be configured when proxying to Kasm Workspaces
# WebSocket Support
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
# Host and X headers
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
# Connectivity Options
proxy_http_version 1.1;
proxy_read_timeout 1800s;
proxy_send_timeout 1800s;
proxy_connect_timeout 1800s;
proxy_buffering off;
# Allow large requests to support file uploads to sessions
client_max_body_size 10M;
# # Proxy to KasmVNC using SSL
#proxy_pass https://127.0.0.1:6901;
# Proxy to KasmVNC without SSL
proxy_pass http://127.0.0.1:6901;
}
}

View File

@ -0,0 +1,24 @@
ARG BASE_IMAGE
FROM $BASE_IMAGE
RUN apk add bash
ENV STARTUPDIR=/dockerstartup
COPY ./builder/scripts/ /tmp/scripts/
COPY alpine/kasmvncserver/APKBUILD /tmp
ARG KASMVNC_PACKAGE_DIR
COPY $KASMVNC_PACKAGE_DIR/kasmvncserver-*.apk /tmp/
RUN /tmp/scripts/install_kasmvncserver_package
ARG RUN_TEST
RUN [ "$RUN_TEST" = 1 ] || apk add xterm
RUN mkdir -p $STARTUPDIR
COPY builder/startup/vnc_startup_barebones.sh $STARTUPDIR
RUN adduser -D -s/bin/bash foo && addgroup foo kasmvnc-cert
USER foo
ENTRYPOINT "/$STARTUPDIR/vnc_startup_barebones.sh"

View File

@ -1,7 +1,19 @@
FROM alpine:3.17
RUN apk add shadow bash
RUN apk add abuild sudo less
ENV HOME /src/alpine
WORKDIR $HOME/kasmvncserver
ARG KASMVNC_ALPINE_PRIVATE_KEY
ARG KASMVNC_ALPINE_PUBLIC_KEY
ENV SCRIPTS_DIR=/tmp/scripts
COPY builder/scripts $SCRIPTS_DIR
RUN $SCRIPTS_DIR/install_alpine_signing_keys
RUN useradd -m docker && echo "docker:docker" | chpasswd
RUN echo 'docker ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
USER docker

View File

@ -1,82 +0,0 @@
FROM alpine:3.17
ENV KASMVNC_BUILD_OS alpine
ENV KASMVNC_BUILD_OS_CODENAME 317
ENV XORG_VER 21.1.8
RUN \
echo "**** install build deps ****" && \
apk add \
alpine-release \
alpine-sdk \
autoconf \
automake \
bash \
ca-certificates \
cmake \
coreutils \
curl \
eudev-dev \
font-cursor-misc \
font-misc-misc \
font-util-dev \
git \
grep \
jq \
libdrm-dev \
libepoxy-dev \
libjpeg-turbo-dev \
libjpeg-turbo-static \
libpciaccess-dev \
libtool \
libwebp-dev \
libx11-dev \
libxau-dev \
libxcb-dev \
libxcursor-dev \
libxcvt-dev \
libxdmcp-dev \
libxext-dev \
libxfont2-dev \
libxkbfile-dev \
libxrandr-dev \
libxshmfence-dev \
libxtst-dev \
mesa-dev \
mesa-dri-gallium \
meson \
nettle-dev \
openssl-dev \
pixman-dev \
procps \
shadow \
tar \
tzdata \
wayland-dev \
wayland-protocols \
xcb-util-dev \
xcb-util-image-dev \
xcb-util-keysyms-dev \
xcb-util-renderutil-dev \
xcb-util-wm-dev \
xinit \
xkbcomp \
xkbcomp-dev \
xkeyboard-config \
xorgproto \
xorg-server-common \
xorg-server-dev \
xtrans
ENV SCRIPTS_DIR=/tmp/scripts
COPY builder/scripts $SCRIPTS_DIR
RUN $SCRIPTS_DIR/build-webp
RUN $SCRIPTS_DIR/build-libjpeg-turbo
RUN useradd -m docker && echo "docker:docker" | chpasswd
COPY --chown=docker:docker . /src/
USER docker
ENTRYPOINT ["/src/builder/build.sh"]

View File

@ -1,7 +1,19 @@
FROM alpine:3.18
RUN apk add shadow bash
RUN apk add abuild sudo less
ENV HOME /src/alpine
WORKDIR $HOME/kasmvncserver
ARG KASMVNC_ALPINE_PRIVATE_KEY
ARG KASMVNC_ALPINE_PUBLIC_KEY
ENV SCRIPTS_DIR=/tmp/scripts
COPY builder/scripts $SCRIPTS_DIR
RUN $SCRIPTS_DIR/install_alpine_signing_keys
RUN useradd -m docker && echo "docker:docker" | chpasswd
RUN echo 'docker ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
USER docker

View File

@ -0,0 +1 @@
dockerfile.alpine.barebones.apk.test

View File

@ -14,6 +14,7 @@ RUN \
bash \
ca-certificates \
cmake \
nasm \
coreutils \
curl \
eudev-dev \
@ -66,7 +67,8 @@ RUN \
xorgproto \
xorg-server-common \
xorg-server-dev \
xtrans
xtrans \
ffmpeg-dev
ENV SCRIPTS_DIR=/tmp/scripts

View File

@ -1,7 +1,19 @@
FROM alpine:3.19
RUN apk add shadow bash
RUN apk add abuild sudo less
ENV HOME /src/alpine
WORKDIR $HOME/kasmvncserver
ARG KASMVNC_ALPINE_PRIVATE_KEY
ARG KASMVNC_ALPINE_PUBLIC_KEY
ENV SCRIPTS_DIR=/tmp/scripts
COPY builder/scripts $SCRIPTS_DIR
RUN $SCRIPTS_DIR/install_alpine_signing_keys
RUN useradd -m docker && echo "docker:docker" | chpasswd
RUN echo 'docker ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
USER docker

View File

@ -0,0 +1 @@
dockerfile.alpine.barebones.apk.test

View File

@ -14,6 +14,7 @@ RUN \
bash \
ca-certificates \
cmake \
nasm \
coreutils \
curl \
eudev-dev \
@ -66,7 +67,8 @@ RUN \
xorgproto \
xorg-server-common \
xorg-server-dev \
xtrans
xtrans \
ffmpeg-dev
ENV SCRIPTS_DIR=/tmp/scripts

View File

@ -1,7 +1,19 @@
FROM alpine:3.20
RUN apk add shadow bash
RUN apk add abuild sudo less
ENV HOME /src/alpine
WORKDIR $HOME/kasmvncserver
ARG KASMVNC_ALPINE_PRIVATE_KEY
ARG KASMVNC_ALPINE_PUBLIC_KEY
ENV SCRIPTS_DIR=/tmp/scripts
COPY builder/scripts $SCRIPTS_DIR
RUN $SCRIPTS_DIR/install_alpine_signing_keys
RUN useradd -m docker && echo "docker:docker" | chpasswd
RUN echo 'docker ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
USER docker

View File

@ -0,0 +1 @@
dockerfile.alpine.barebones.apk.test

View File

@ -14,6 +14,7 @@ RUN \
bash \
ca-certificates \
cmake \
nasm \
coreutils \
curl \
eudev-dev \
@ -66,7 +67,8 @@ RUN \
xorgproto \
xorg-server-common \
xorg-server-dev \
xtrans
xtrans \
ffmpeg-dev
ENV SCRIPTS_DIR=/tmp/scripts

View File

@ -1,7 +1,19 @@
FROM alpine:3.21
RUN apk add shadow bash
RUN apk add abuild sudo less ffmpeg-dev
ENV HOME /src/alpine
WORKDIR $HOME/kasmvncserver
ARG KASMVNC_ALPINE_PRIVATE_KEY
ARG KASMVNC_ALPINE_PUBLIC_KEY
ENV SCRIPTS_DIR=/tmp/scripts
COPY builder/scripts $SCRIPTS_DIR
RUN $SCRIPTS_DIR/install_alpine_signing_keys
RUN useradd -m docker && echo "docker:docker" | chpasswd
RUN echo 'docker ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
USER docker

View File

@ -0,0 +1 @@
dockerfile.alpine.barebones.apk.test

View File

@ -14,6 +14,7 @@ RUN \
bash \
ca-certificates \
cmake \
nasm \
coreutils \
curl \
eudev-dev \
@ -66,7 +67,8 @@ RUN \
xorgproto \
xorg-server-common \
xorg-server-dev \
xtrans
xtrans \
ffmpeg-dev
ENV SCRIPTS_DIR=/tmp/scripts

View File

@ -1,20 +0,0 @@
FROM centos:centos7
ENV STARTUPDIR=/dockerstartup
RUN yum install -y xterm
RUN yum install -y vim less
RUN yum install -y redhat-lsb-core
RUN yum install -y epel-release
ARG KASMVNC_PACKAGE_DIR
COPY $KASMVNC_PACKAGE_DIR/*.rpm /tmp/
RUN yum localinstall -y /tmp/*.rpm
RUN mkdir -p $STARTUPDIR
COPY startup/vnc_startup_barebones.sh $STARTUPDIR
RUN useradd -m foo
USER foo:kasmvnc-cert
ENTRYPOINT "/$STARTUPDIR/vnc_startup_barebones.sh"

View File

@ -1,35 +0,0 @@
FROM centos:centos7
ENV KASMVNC_BUILD_OS centos
ENV KASMVNC_BUILD_OS_CODENAME core
RUN yum install -y ca-certificates
RUN yum install -y build-dep xorg-server libxfont-dev sudo
RUN yum install -y gcc cmake git libgnutls28-dev vim wget tightvncserver
RUN yum install -y libpng-dev libtiff-dev libgif-dev libavcodec-dev openssl-devel
RUN yum install -y make
RUN yum group install -y "Development Tools"
RUN yum install -y xorg-x11-server-devel zlib-devel
RUN yum install -y libxkbfile-devel libXfont2-devel xorg-x11-font-utils \
xorg-x11-xtrans-devel xorg-x11-xkb-utils-devel libXrandr-devel pam-devel \
gnutls-devel libX11-devel libXtst-devel libXcursor-devel
RUN yum install -y mesa-dri-drivers
RUN yum install -y ca-certificates
# Additions for webp
RUN cd /tmp && wget https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-1.0.2.tar.gz
RUN cd /tmp && tar -xzf /tmp/libwebp-*
RUN cd /tmp/libwebp-1.0.2 && \
./configure --enable-static --disable-shared && \
make && make install
ENV SCRIPTS_DIR=/tmp/scripts
COPY builder/scripts $SCRIPTS_DIR
RUN $SCRIPTS_DIR/build-libjpeg-turbo
RUN useradd -m docker && echo "docker:docker" | chpasswd
COPY --chown=docker:docker . /src/
USER docker
ENTRYPOINT ["/src/builder/build.sh"]

View File

@ -1,12 +0,0 @@
FROM centos:centos7
RUN yum install -y rpm* gpg* rng-tools rpmlint
RUN yum install -y tree vim less
RUN yum install -y redhat-lsb-core
COPY centos/*.spec /tmp
RUN yum-builddep -y /tmp/*.spec
RUN useradd -m docker && echo "docker:docker" | chpasswd
USER docker

View File

@ -1,64 +0,0 @@
FROM centos:centos7
ENV DISPLAY=:1 \
VNC_PORT=8443 \
VNC_RESOLUTION=1280x720 \
MAX_FRAME_RATE=24 \
VNCOPTIONS="-PreferBandwidth -DynamicQualityMin=4 -DynamicQualityMax=7" \
HOME=/home/user \
TERM=xterm \
STARTUPDIR=/dockerstartup \
INST_SCRIPTS=/dockerstartup/install \
KASM_RX_HOME=/dockerstartup/kasmrx \
DEBIAN_FRONTEND=noninteractive \
VNC_COL_DEPTH=24 \
VNC_RESOLUTION=1280x1024 \
VNC_PW=vncpassword \
VNC_USER=user \
VNC_VIEW_ONLY_PW=vncviewonlypassword \
LD_LIBRARY_PATH=/usr/local/lib/ \
OMP_WAIT_POLICY=PASSIVE \
SHELL=/bin/bash \
SINGLE_APPLICATION=0 \
KASMVNC_BUILD_OS=centos \
KASMVNC_BUILD_OS_CODENAME=core
EXPOSE $VNC_PORT
WORKDIR $HOME
### REQUIRED STUFF ###
RUN yum install -y openssl xterm gettext wget
RUN yum install -y centos-release-scl-rh && yum install -y nss_wrapper
RUN yum install -y xorg-x11-server xorg-x11-xauth xorg-x11-xkb-utils \
xkeyboard-config xorg-x11-server-utils
RUN yum install -y epel-release && yum groupinstall xfce -y
RUN yum erase -y pm-utils xscreensaver*
RUN yum install -y redhat-lsb-core
RUN yum install -y vim less
RUN echo 'source $STARTUPDIR/generate_container_user' >> $HOME/.bashrc
RUN mkdir -p $STARTUPDIR
COPY builder/startup/ $STARTUPDIR
### START CUSTOM STUFF ####
COPY ./builder/scripts/ /tmp/scripts/
COPY ./centos/kasmvncserver.spec /tmp
ARG KASMVNC_PACKAGE_DIR
COPY $KASMVNC_PACKAGE_DIR/*.rpm /tmp/
RUN /tmp/scripts/install_kasmvncserver_package
### END CUSTOM STUFF ###
RUN chown -R 1000:0 $HOME
USER 1000:kasmvnc-cert
WORKDIR $HOME
RUN mkdir ~/.vnc && echo '/usr/bin/xfce4-session &' >> ~/.vnc/xstartup && \
chmod +x ~/.vnc/xstartup
ENTRYPOINT [ "/dockerstartup/vnc_startup.sh" ]

View File

@ -0,0 +1,22 @@
ARG BASE_IMAGE
FROM $BASE_IMAGE
ENV STARTUPDIR=/dockerstartup
COPY ./builder/scripts/ /tmp/scripts/
COPY ./debian/changelog /tmp
ARG KASMVNC_PACKAGE_DIR
COPY $KASMVNC_PACKAGE_DIR/kasmvncserver_*.deb /tmp/
RUN /tmp/scripts/install_kasmvncserver_package
ARG RUN_TEST
RUN if [ "$RUN_TEST" != 1 ]; then apt-get update && apt-get -y install xterm lsb-release; fi
RUN mkdir -p $STARTUPDIR
COPY builder/startup/vnc_startup_barebones.sh $STARTUPDIR
RUN useradd -m foo && adduser foo ssl-cert
USER foo
ENTRYPOINT "/$STARTUPDIR/vnc_startup_barebones.sh"

View File

@ -0,0 +1 @@
dockerfile.debian.barebones.deb.test

View File

@ -22,8 +22,9 @@ RUN apt-get update && \
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata
RUN apt-get update && apt-get -y build-dep xorg-server libxfont-dev
RUN apt-get update && apt-get -y install cmake git libgnutls28-dev vim wget tightvncserver curl
RUN apt-get update && apt-get -y install libpng-dev libtiff-dev libgif-dev libavcodec-dev libssl-dev libxrandr-dev libxcursor-dev
RUN apt-get update && apt-get -y install ninja-build cmake nasm git libgnutls28-dev vim wget tightvncserver curl
RUN apt-get update && apt-get -y install libpng-dev libtiff-dev libgif-dev libavcodec-dev libssl-dev libxrandr-dev \
libxcursor-dev libavformat-dev libswscale-dev
ENV SCRIPTS_DIR=/tmp/scripts
COPY builder/scripts $SCRIPTS_DIR

View File

@ -0,0 +1 @@
dockerfile.debian.barebones.deb.test

View File

@ -12,8 +12,22 @@ RUN apt-get update && \
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata
RUN apt-get update && apt-get -y build-dep xorg-server libxfont-dev
RUN apt-get update && apt-get -y install cmake git libgnutls28-dev vim wget tightvncserver curl
RUN apt-get update && apt-get -y install libpng-dev libtiff-dev libgif-dev libavcodec-dev libssl-dev libxrandr-dev libxcursor-dev
RUN apt-get update && apt-get -y install ninja-build nasm git libgnutls28-dev vim wget tightvncserver curl
RUN apt-get update && apt-get -y install libpng-dev libtiff-dev libgif-dev libavcodec-dev libssl-dev libxrandr-dev \
libxcursor-dev libavformat-dev libswscale-dev
RUN CMAKE_URL="https://cmake.org/files/v3.22/cmake-3.22.0" && \
ARCH=$(arch) && \
if [ "$ARCH" = "x86_64" ]; then \
CMAKE_URL="${CMAKE_URL}-linux-x86_64.sh"; \
elif [ "$ARCH" = "aarch64" ]; then \
CMAKE_URL="${CMAKE_URL}-linux-aarch64.sh"; \
else \
echo "Unsupported architecture: $ARCH" && exit 1; \
fi && \
curl -fsSL $CMAKE_URL -o cmake.sh && \
(echo y; echo n) | bash cmake.sh --prefix=/usr/local --skip-license && \
rm cmake.sh
ENV SCRIPTS_DIR=/tmp/scripts
COPY builder/scripts $SCRIPTS_DIR

View File

@ -12,7 +12,7 @@ RUN apt-get update && \
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata
RUN apt-get update && apt-get -y build-dep xorg-server libxfont-dev
RUN apt-get update && apt-get -y install cmake git libgnutls28-dev vim wget tightvncserver curl
RUN apt-get update && apt-get -y install ninja-build cmake nasm git libgnutls28-dev vim wget tightvncserver curl
RUN apt-get update && apt-get -y install libpng-dev libtiff-dev libgif-dev libavcodec-dev libssl-dev libxrandr-dev libxcursor-dev
ENV SCRIPTS_DIR=/tmp/scripts

View File

@ -0,0 +1,25 @@
FROM fedora:40
ENV STARTUPDIR=/dockerstartup
ARG RUN_TEST
RUN [ "$RUN_TEST" = 1 ] || dnf install -y \
less \
redhat-lsb-core \
vim \
xterm
COPY ./builder/scripts/ /tmp/scripts/
ARG KASMVNC_PACKAGE_DIR
COPY $KASMVNC_PACKAGE_DIR/kasmvncserver-*.rpm /tmp/
COPY fedora/kasmvncserver.spec /tmp/
RUN /tmp/scripts/install_kasmvncserver_package
RUN mkdir -p $STARTUPDIR
COPY builder/startup/vnc_startup_barebones.sh $STARTUPDIR
RUN useradd -m foo
USER foo:kasmvnc-cert
ENTRYPOINT "/$STARTUPDIR/vnc_startup_barebones.sh"

View File

@ -16,6 +16,7 @@ RUN \
byacc \
bzip2 \
cmake \
nasm \
diffutils \
doxygen \
file \
@ -71,7 +72,9 @@ RUN \
xorg-x11-server-common \
xorg-x11-server-devel \
xorg-x11-xtrans-devel \
xsltproc
xsltproc \
libavformat-free-devel \
libswscale-free-devel
ENV SCRIPTS_DIR=/tmp/scripts
COPY builder/scripts $SCRIPTS_DIR

View File

@ -0,0 +1,25 @@
FROM fedora:41
ENV STARTUPDIR=/dockerstartup
ARG RUN_TEST
RUN [ "$RUN_TEST" = 1 ] || dnf install -y \
less \
redhat-lsb-core \
vim \
xterm
COPY ./builder/scripts/ /tmp/scripts/
ARG KASMVNC_PACKAGE_DIR
COPY $KASMVNC_PACKAGE_DIR/kasmvncserver-*.rpm /tmp/
COPY fedora/kasmvncserver.spec /tmp/
RUN /tmp/scripts/install_kasmvncserver_package
RUN mkdir -p $STARTUPDIR
COPY builder/startup/vnc_startup_barebones.sh $STARTUPDIR
RUN useradd -m foo
USER foo:kasmvnc-cert
ENTRYPOINT "/$STARTUPDIR/vnc_startup_barebones.sh"

View File

@ -17,6 +17,7 @@ RUN \
byacc \
bzip2 \
cmake \
nasm \
diffutils \
doxygen \
file \
@ -72,7 +73,9 @@ RUN \
xorg-x11-server-common \
xorg-x11-server-devel \
xorg-x11-xtrans-devel \
xsltproc
xsltproc \
libavformat-free-devel \
libswscale-free-devel
ENV SCRIPTS_DIR=/tmp/scripts
COPY builder/scripts $SCRIPTS_DIR

View File

@ -1,19 +0,0 @@
FROM fedora:38
ENV STARTUPDIR=/dockerstartup
RUN dnf install -y xterm
RUN dnf install -y vim less
RUN yum install -y redhat-lsb-core
ARG KASMVNC_PACKAGE_DIR
COPY $KASMVNC_PACKAGE_DIR/*.rpm /tmp/
RUN dnf localinstall -y /tmp/*.rpm
RUN mkdir -p $STARTUPDIR
COPY startup/vnc_startup_barebones.sh $STARTUPDIR
RUN useradd -m foo
USER foo:kasmvnc-cert
ENTRYPOINT "/$STARTUPDIR/vnc_startup_barebones.sh"

View File

@ -1,86 +0,0 @@
FROM fedora:38
ENV KASMVNC_BUILD_OS fedora
ENV KASMVNC_BUILD_OS_CODENAME thirtyeight
ENV XORG_VER 1.20.14
RUN \
echo "**** install build deps ****" && \
dnf group install -y \
"C Development Tools and Libraries" \
"Development Tools" && \
dnf install -y \
autoconf \
automake \
bison \
byacc \
bzip2 \
cmake \
diffutils \
doxygen \
file \
flex \
fop \
gcc \
gcc-c++ \
git \
glibc-devel \
libdrm-devel \
libepoxy-devel \
libmd-devel \
libpciaccess-devel \
libtool \
libwebp-devel \
libX11-devel \
libXau-devel \
libxcb-devel \
libXcursor-devel \
libxcvt-devel \
libXdmcp-devel \
libXext-devel \
libXfont2-devel \
libxkbfile-devel \
libXrandr-devel \
libxshmfence-devel \
libXtst-devel \
mesa-libEGL-devel \
mesa-libgbm-devel \
mesa-libGL-devel \
meson \
mingw64-binutils \
mt-st \
nettle-devel \
openssl-devel \
patch \
pixman-devel \
wayland-devel \
wget \
which \
xcb-util-devel \
xcb-util-image-devel \
xcb-util-keysyms-devel \
xcb-util-renderutil-devel \
xcb-util-wm-devel \
xinit \
xkbcomp \
xkbcomp-devel \
xkeyboard-config \
xmlto \
xorg-x11-font-utils \
xorg-x11-proto-devel \
xorg-x11-server-common \
xorg-x11-server-devel \
xorg-x11-xtrans-devel \
xsltproc
ENV SCRIPTS_DIR=/tmp/scripts
COPY builder/scripts $SCRIPTS_DIR
RUN $SCRIPTS_DIR/build-webp
RUN $SCRIPTS_DIR/build-libjpeg-turbo
RUN useradd -m docker && echo "docker:docker" | chpasswd
COPY --chown=docker:docker . /src/
USER docker
ENTRYPOINT ["/src/builder/build.sh"]

View File

@ -1,13 +0,0 @@
FROM fedora:38
RUN dnf install -y fedora-packager fedora-review
RUN dnf install -y tree vim less
RUN dnf install -y redhat-lsb-core
RUN dnf install -y dnf-plugins-core
COPY fedora/*.spec /tmp
RUN dnf builddep -y /tmp/*.spec
RUN useradd -m docker && echo "docker:docker" | chpasswd
USER docker

View File

@ -1,62 +0,0 @@
FROM fedora:38
ENV DISPLAY=:1 \
VNC_PORT=8443 \
VNC_RESOLUTION=1280x720 \
MAX_FRAME_RATE=24 \
VNCOPTIONS="-PreferBandwidth -DynamicQualityMin=4 -DynamicQualityMax=7" \
HOME=/home/user \
TERM=xterm \
STARTUPDIR=/dockerstartup \
INST_SCRIPTS=/dockerstartup/install \
KASM_RX_HOME=/dockerstartup/kasmrx \
DEBIAN_FRONTEND=noninteractive \
VNC_COL_DEPTH=24 \
VNC_RESOLUTION=1280x1024 \
VNC_PW=vncpassword \
VNC_USER=user \
VNC_VIEW_ONLY_PW=vncviewonlypassword \
LD_LIBRARY_PATH=/usr/local/lib/ \
OMP_WAIT_POLICY=PASSIVE \
SHELL=/bin/bash \
SINGLE_APPLICATION=0 \
KASMVNC_BUILD_OS=fedora \
KASMVNC_BUILD_OS_CODENAME=thirtythree
EXPOSE $VNC_PORT
WORKDIR $HOME
### REQUIRED STUFF ###
RUN dnf install -y openssl xterm gettext wget
RUN dnf install -y nss_wrapper
RUN dnf install -y xorg-x11-xauth xkeyboard-config
# xorg-x11-server-Xorg
# RUN dnf install -y @xfce-desktop-environment
RUN dnf erase -y pm-utils xscreensaver*
RUN dnf install -y redhat-lsb-core
RUN dnf install -y vim less
RUN dnf install -y @xfce-desktop-environment
RUN echo 'source $STARTUPDIR/generate_container_user' >> $HOME/.bashrc
RUN mkdir -p $STARTUPDIR
COPY builder/startup/ $STARTUPDIR
### START CUSTOM STUFF ####
COPY ./builder/scripts/ /tmp/scripts/
COPY ./fedora/kasmvncserver.spec /tmp
ARG KASMVNC_PACKAGE_DIR
COPY $KASMVNC_PACKAGE_DIR/*.rpm /tmp/
# RUN dnf remove -y tigervnc-server-minimal
RUN /tmp/scripts/install_kasmvncserver_package
### END CUSTOM STUFF ###
RUN chown -R 1000:0 $HOME
USER 1000:kasmvnc-cert
WORKDIR $HOME
ENTRYPOINT [ "/dockerstartup/vnc_startup.sh" ]

View File

@ -16,6 +16,7 @@ RUN \
byacc \
bzip2 \
cmake \
nasm \
diffutils \
doxygen \
file \
@ -71,7 +72,9 @@ RUN \
xorg-x11-server-common \
xorg-x11-server-devel \
xorg-x11-xtrans-devel \
xsltproc
xsltproc \
libavformat-free-devel \
libswscale-free-devel
ENV SCRIPTS_DIR=/tmp/scripts
COPY builder/scripts $SCRIPTS_DIR

View File

@ -1,19 +0,0 @@
FROM fedora:37
ENV STARTUPDIR=/dockerstartup
RUN dnf install -y xterm
RUN dnf install -y vim less
RUN yum install -y redhat-lsb-core
ARG KASMVNC_PACKAGE_DIR
COPY $KASMVNC_PACKAGE_DIR/*.rpm /tmp/
RUN dnf localinstall -y /tmp/*.rpm
RUN mkdir -p $STARTUPDIR
COPY startup/vnc_startup_barebones.sh $STARTUPDIR
RUN useradd -m foo
USER foo:kasmvnc-cert
ENTRYPOINT "/$STARTUPDIR/vnc_startup_barebones.sh"

View File

@ -1,86 +0,0 @@
FROM fedora:37
ENV KASMVNC_BUILD_OS fedora
ENV KASMVNC_BUILD_OS_CODENAME thirtyseven
ENV XORG_VER 1.20.14
RUN \
echo "**** install build deps ****" && \
dnf group install -y \
"C Development Tools and Libraries" \
"Development Tools" && \
dnf install -y \
autoconf \
automake \
bison \
byacc \
bzip2 \
cmake \
diffutils \
doxygen \
file \
flex \
fop \
gcc \
gcc-c++ \
git \
glibc-devel \
libdrm-devel \
libepoxy-devel \
libmd-devel \
libpciaccess-devel \
libtool \
libwebp-devel \
libX11-devel \
libXau-devel \
libxcb-devel \
libXcursor-devel \
libxcvt-devel \
libXdmcp-devel \
libXext-devel \
libXfont2-devel \
libxkbfile-devel \
libXrandr-devel \
libxshmfence-devel \
libXtst-devel \
mesa-libEGL-devel \
mesa-libgbm-devel \
mesa-libGL-devel \
meson \
mingw64-binutils \
mt-st \
nettle-devel \
openssl-devel \
patch \
pixman-devel \
wayland-devel \
wget \
which \
xcb-util-devel \
xcb-util-image-devel \
xcb-util-keysyms-devel \
xcb-util-renderutil-devel \
xcb-util-wm-devel \
xinit \
xkbcomp \
xkbcomp-devel \
xkeyboard-config \
xmlto \
xorg-x11-font-utils \
xorg-x11-proto-devel \
xorg-x11-server-common \
xorg-x11-server-devel \
xorg-x11-xtrans-devel \
xsltproc
ENV SCRIPTS_DIR=/tmp/scripts
COPY builder/scripts $SCRIPTS_DIR
RUN $SCRIPTS_DIR/build-webp
RUN $SCRIPTS_DIR/build-libjpeg-turbo
RUN useradd -m docker && echo "docker:docker" | chpasswd
COPY --chown=docker:docker . /src/
USER docker
ENTRYPOINT ["/src/builder/build.sh"]

View File

@ -1,13 +0,0 @@
FROM fedora:37
RUN dnf install -y fedora-packager fedora-review
RUN dnf install -y tree vim less
RUN dnf install -y redhat-lsb-core
RUN dnf install -y dnf-plugins-core
COPY fedora/*.spec /tmp
RUN dnf builddep -y /tmp/*.spec
RUN useradd -m docker && echo "docker:docker" | chpasswd
USER docker

View File

@ -1,62 +0,0 @@
FROM fedora:37
ENV DISPLAY=:1 \
VNC_PORT=8443 \
VNC_RESOLUTION=1280x720 \
MAX_FRAME_RATE=24 \
VNCOPTIONS="-PreferBandwidth -DynamicQualityMin=4 -DynamicQualityMax=7" \
HOME=/home/user \
TERM=xterm \
STARTUPDIR=/dockerstartup \
INST_SCRIPTS=/dockerstartup/install \
KASM_RX_HOME=/dockerstartup/kasmrx \
DEBIAN_FRONTEND=noninteractive \
VNC_COL_DEPTH=24 \
VNC_RESOLUTION=1280x1024 \
VNC_PW=vncpassword \
VNC_USER=user \
VNC_VIEW_ONLY_PW=vncviewonlypassword \
LD_LIBRARY_PATH=/usr/local/lib/ \
OMP_WAIT_POLICY=PASSIVE \
SHELL=/bin/bash \
SINGLE_APPLICATION=0 \
KASMVNC_BUILD_OS=fedora \
KASMVNC_BUILD_OS_CODENAME=thirtythree
EXPOSE $VNC_PORT
WORKDIR $HOME
### REQUIRED STUFF ###
RUN dnf install -y openssl xterm gettext wget
RUN dnf install -y nss_wrapper
RUN dnf install -y xorg-x11-xauth xkeyboard-config
# xorg-x11-server-Xorg
# RUN dnf install -y @xfce-desktop-environment
RUN dnf erase -y pm-utils xscreensaver*
RUN dnf install -y redhat-lsb-core
RUN dnf install -y vim less
RUN dnf install -y @xfce-desktop-environment
RUN echo 'source $STARTUPDIR/generate_container_user' >> $HOME/.bashrc
RUN mkdir -p $STARTUPDIR
COPY builder/startup/ $STARTUPDIR
### START CUSTOM STUFF ####
COPY ./builder/scripts/ /tmp/scripts/
COPY ./fedora/kasmvncserver.spec /tmp
ARG KASMVNC_PACKAGE_DIR
COPY $KASMVNC_PACKAGE_DIR/*.rpm /tmp/
# RUN dnf remove -y tigervnc-server-minimal
RUN /tmp/scripts/install_kasmvncserver_package
### END CUSTOM STUFF ###
RUN chown -R 1000:0 $HOME
USER 1000:kasmvnc-cert
WORKDIR $HOME
ENTRYPOINT [ "/dockerstartup/vnc_startup.sh" ]

View File

@ -0,0 +1 @@
dockerfile.debian.barebones.deb.test

View File

@ -13,8 +13,9 @@ RUN apt-get update && \
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata
RUN apt-get update && apt-get -y build-dep xorg-server libxfont-dev
RUN apt-get update && apt-get -y install gcc g++ curl
RUN apt-get update && apt-get -y install cmake git libgnutls28-dev vim wget tightvncserver
RUN apt-get update && apt-get -y install libpng-dev libtiff-dev libgif-dev libavcodec-dev libssl-dev libxrandr-dev libxcursor-dev
RUN apt-get update && apt-get -y install ninja-build cmake nasm git libgnutls28-dev vim wget tightvncserver
RUN apt-get update && apt-get -y install libpng-dev libtiff-dev libgif-dev libavcodec-dev libssl-dev libxrandr-dev \
libxcursor-dev libavformat-dev libswscale-dev
ENV SCRIPTS_DIR=/tmp/scripts
COPY builder/scripts $SCRIPTS_DIR

View File

@ -3,7 +3,8 @@ FROM opensuse/leap:15.5
ENV STARTUPDIR=/dockerstartup
# base tools
RUN zypper -n install -y \
ARG RUN_TEST
RUN [ "$RUN_TEST" = 1 ] || zypper -n install -y \
less \
vim \
xterm
@ -15,7 +16,7 @@ COPY $KASMVNC_PACKAGE_DIR/*.rpm /tmp
RUN zypper install -y --allow-unsigned-rpm /tmp/*.rpm
RUN mkdir -p $STARTUPDIR
COPY startup/vnc_startup_barebones.sh $STARTUPDIR
COPY builder/startup/vnc_startup_barebones.sh $STARTUPDIR
RUN useradd -m foo
USER foo:kasmvnc-cert

View File

@ -8,13 +8,17 @@ ENV XORG_VER 1.20.3
RUN zypper install -ny \
bdftopcf \
bigreqsproto-devel \
ninja \
cmake \
nasm \
curl \
ffmpeg-4-libavcodec-devel \
ffmpeg-4-libswscale-devel \
ffmpeg-4-libavformat-devel \
fonttosfnt \
font-util \
gcc \
gcc-c++ \
gcc14 \
gcc14-c++ \
giflib-devel \
git \
gzip \
@ -45,17 +49,32 @@ RUN zypper install -ny \
xorg-x11-util-devel \
zlib-devel
ENV SCRIPTS_DIR=/tmp/scripts
COPY builder/scripts $SCRIPTS_DIR
RUN $SCRIPTS_DIR/build-webp
RUN $SCRIPTS_DIR/build-libjpeg-turbo
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 140 \
--slave /usr/bin/g++ g++ /usr/bin/g++-14 \
--slave /usr/bin/gcov gcov /usr/bin/gcov-14
RUN useradd -u 1000 docker && \
groupadd -g 1000 docker && \
usermod -a -G docker docker
RUN ARCH=$(arch) && \
CMAKE_URL="https://cmake.org/files/v3.22/cmake-3.22.0" && \
if [ "$ARCH" = "x86_64" ]; then \
CMAKE_URL="${CMAKE_URL}-linux-x86_64.sh"; \
elif [ "$ARCH" = "aarch64" ]; then \
CMAKE_URL="${CMAKE_URL}-linux-aarch64.sh"; \
else \
echo "Unsupported architecture: $ARCH" && exit 1; \
fi && \
curl -fsSL $CMAKE_URL -o cmake.sh && \
(echo y; echo n) | bash cmake.sh --prefix=/usr/local --skip-license && \
rm cmake.sh
ENV SCRIPTS_DIR=/tmp/scripts
COPY builder/scripts $SCRIPTS_DIR
RUN $SCRIPTS_DIR/build-webp && $SCRIPTS_DIR/build-libjpeg-turbo
COPY --chown=docker:docker . /src/
USER docker
ENTRYPOINT ["/src/builder/build.sh"]
ENTRYPOINT ["bash", "-l", "-c", "/src/builder/build.sh"]

View File

@ -2,7 +2,8 @@ FROM oraclelinux:8
ENV STARTUPDIR=/dockerstartup
RUN dnf install -y \
ARG RUN_TEST
RUN [ "$RUN_TEST" = 1 ] || dnf install -y \
less \
redhat-lsb-core \
vim \
@ -10,12 +11,15 @@ RUN dnf install -y \
RUN dnf config-manager --set-enabled ol8_codeready_builder
RUN dnf install -y oracle-epel-release-el8
COPY ./builder/scripts/ /tmp/scripts/
ARG KASMVNC_PACKAGE_DIR
COPY $KASMVNC_PACKAGE_DIR/*.rpm /tmp
RUN dnf localinstall -y /tmp/*.rpm
COPY $KASMVNC_PACKAGE_DIR/kasmvncserver-*.rpm /tmp/
COPY fedora/kasmvncserver.spec /tmp/
RUN /tmp/scripts/install_kasmvncserver_package
RUN mkdir -p $STARTUPDIR
COPY startup/vnc_startup_barebones.sh $STARTUPDIR
COPY builder/startup/vnc_startup_barebones.sh $STARTUPDIR
RUN useradd -m foo
USER foo:kasmvnc-cert

View File

@ -11,10 +11,13 @@ RUN \
dnf install -y \
bzip2-devel \
ca-certificates \
ninja-build \
cmake \
nasm \
dnf-plugins-core \
gcc \
gcc-c++ \
gcc-toolset-14 \
git \
gnutls-devel \
libjpeg-turbo-devel \
@ -38,6 +41,7 @@ RUN dnf install -y --nogpgcheck https://mirrors.rpmfusion.org/free/el/rpmfusion-
# Install from new repos
RUN dnf install -y \
tbb-devel \
ffmpeg-devel \
giflib-devel \
lbzip2 \
@ -48,16 +52,16 @@ RUN dnf install -y \
xorg-x11-xtrans-devel \
libXrandr-devel \
libXtst-devel \
libXcursor-devel
libXcursor-devel \
libSM-devel
ENV SCRIPTS_DIR=/tmp/scripts
COPY builder/scripts $SCRIPTS_DIR
RUN $SCRIPTS_DIR/build-webp
RUN $SCRIPTS_DIR/build-libjpeg-turbo
RUN useradd -m docker && echo "docker:docker" | chpasswd
RUN echo "source /opt/rh/gcc-toolset-14/enable" > /etc/profile.d/gcc-toolset.sh && \
$SCRIPTS_DIR/build-webp && $SCRIPTS_DIR/build-libjpeg-turbo && \
useradd -m docker && echo "docker:docker" | chpasswd
COPY --chown=docker:docker . /src/
USER docker
ENTRYPOINT ["/src/builder/build.sh"]
ENTRYPOINT ["bash", "-l", "-c", "/src/builder/build.sh"]

View File

@ -2,7 +2,7 @@ FROM oraclelinux:9
ENV STARTUPDIR=/dockerstartup
RUN dnf install -y \
RUN [ "$RUN_TEST" = 1 ] || dnf install -y \
less \
vim \
xterm
@ -17,7 +17,7 @@ RUN dnf install -y crypto-policies-scripts
RUN update-crypto-policies --set FIPS:SHA1
RUN mkdir -p $STARTUPDIR
COPY startup/vnc_startup_barebones.sh $STARTUPDIR
COPY builder/startup/vnc_startup_barebones.sh $STARTUPDIR
RUN useradd -m foo
USER foo:kasmvnc-cert

View File

@ -11,10 +11,13 @@ RUN \
dnf install -y \
bzip2-devel \
ca-certificates \
ninja-build \
cmake \
nasm \
dnf-plugins-core \
gcc \
gcc-c++ \
gcc-toolset-14 \
git \
gnutls-devel \
libjpeg-turbo-devel \
@ -40,6 +43,7 @@ RUN dnf install -y --nogpgcheck https://mirrors.rpmfusion.org/free/el/rpmfusion-
# Install from new repos
RUN dnf install -y \
giflib-devel \
ffmpeg-devel \
lbzip2 \
libXfont2-devel \
libxkbfile-devel \
@ -47,17 +51,16 @@ RUN dnf install -y \
xorg-x11-xtrans-devel \
libXrandr-devel \
libXtst-devel \
libXcursor-devel
libXcursor-devel \
libSM-devel
ENV SCRIPTS_DIR=/tmp/scripts
COPY builder/scripts $SCRIPTS_DIR
RUN $SCRIPTS_DIR/build-webp
RUN $SCRIPTS_DIR/build-libjpeg-turbo
RUN useradd -m docker && echo "docker:docker" | chpasswd
RUN echo "source /opt/rh/gcc-toolset-14/enable" > /etc/profile.d/gcc-toolset.sh && \
$SCRIPTS_DIR/build-webp && $SCRIPTS_DIR/build-libjpeg-turbo && \
useradd -m docker && echo "docker:docker" | chpasswd
COPY --chown=docker:docker . /src/
USER docker
ENTRYPOINT ["/src/builder/build.sh"]
ENTRYPOINT ["bash", "-l", "-c", "/src/builder/build.sh"]

View File

@ -1,32 +0,0 @@
FROM ubuntu:18.04
ENV KASMVNC_BUILD_OS ubuntu
ENV KASMVNC_BUILD_OS_CODENAME bionic
ENV XORG_VER 1.20.10
RUN sed -i 's$# deb-src$deb-src$' /etc/apt/sources.list
RUN apt-get update && \
apt-get -y install sudo
RUN apt-get update && apt-get -y build-dep xorg-server libxfont-dev
RUN apt-get update && apt-get -y install cmake git libgnutls28-dev vim wget tightvncserver curl
RUN apt-get update && apt-get -y install libpng-dev libtiff-dev libgif-dev libavcodec-dev libssl-dev libxrandr-dev libxcursor-dev
ENV SCRIPTS_DIR=/tmp/scripts
COPY builder/scripts $SCRIPTS_DIR
RUN $SCRIPTS_DIR/build-webp
RUN $SCRIPTS_DIR/build-libjpeg-turbo
# Fix for older required libs
#RUN cd /tmp && wget http://launchpadlibrarian.net/347526424/libxfont1-dev_1.5.2-4ubuntu2_amd64.deb && \
# wget http://launchpadlibrarian.net/347526425/libxfont1_1.5.2-4ubuntu2_amd64.deb && \
# dpkg -i libxfont1_1.5.2-4ubuntu2_amd64.deb && \
# dpkg -i libxfont1-dev_1.5.2-4ubuntu2_amd64.deb
RUN useradd -m docker && echo "docker:docker" | chpasswd && adduser docker sudo
COPY --chown=docker:docker . /src/
USER docker
ENTRYPOINT ["/src/builder/build.sh"]

View File

@ -1,17 +0,0 @@
FROM ubuntu:bionic
RUN apt-get update && \
apt-get -y install vim build-essential devscripts equivs
# Install build-deps for the package.
COPY ./debian/control /tmp
RUN apt-get update && echo YYY | mk-build-deps --install --remove /tmp/control
ARG L_UID
RUN if [ "$L_UID" -eq 0 ]; then \
useradd -m docker; \
else \
useradd -m docker -u $L_UID;\
fi
USER docker

View File

@ -1,57 +0,0 @@
FROM ubuntu:bionic
ENV DISPLAY=:1 \
VNC_PORT=8443 \
VNC_RESOLUTION=1280x720 \
MAX_FRAME_RATE=24 \
VNCOPTIONS="-PreferBandwidth -DynamicQualityMin=4 -DynamicQualityMax=7" \
HOME=/home/user \
TERM=xterm \
STARTUPDIR=/dockerstartup \
INST_SCRIPTS=/dockerstartup/install \
KASM_RX_HOME=/dockerstartup/kasmrx \
DEBIAN_FRONTEND=noninteractive \
VNC_COL_DEPTH=24 \
VNC_RESOLUTION=1280x1024 \
VNC_PW=vncpassword \
VNC_USER=user \
VNC_VIEW_ONLY_PW=vncviewonlypassword \
LD_LIBRARY_PATH=/usr/local/lib/ \
OMP_WAIT_POLICY=PASSIVE \
SHELL=/bin/bash \
SINGLE_APPLICATION=0 \
KASMVNC_BUILD_OS=ubuntu \
KASMVNC_BUILD_OS_CODENAME=bionic
EXPOSE $VNC_PORT
WORKDIR $HOME
### REQUIRED STUFF ###
RUN apt-get update && apt-get install -y supervisor xfce4 xfce4-terminal xterm libnss-wrapper gettext wget
RUN apt-get purge -y pm-utils xscreensaver*
RUN apt-get update && apt-get install -y vim less
RUN apt-get update && apt-get -y install lsb-release
RUN echo 'source $STARTUPDIR/generate_container_user' >> $HOME/.bashrc
RUN mkdir -p $STARTUPDIR
COPY builder/startup/ $STARTUPDIR
### START CUSTOM STUFF ####
COPY ./builder/scripts/ /tmp/scripts/
COPY ./debian/changelog /tmp
ARG KASMVNC_PACKAGE_DIR
COPY $KASMVNC_PACKAGE_DIR/kasmvncserver_*.deb /tmp/
RUN /tmp/scripts/install_kasmvncserver_package
### END CUSTOM STUFF ###
RUN chown -R 1000:0 $HOME
USER 1000:ssl-cert
WORKDIR $HOME
ENTRYPOINT [ "/dockerstartup/vnc_startup.sh" ]

View File

@ -1,51 +0,0 @@
FROM ubuntu:18.04
ENV DISPLAY=:1 \
VNC_PORT=8443 \
VNC_RESOLUTION=1280x720 \
MAX_FRAME_RATE=24 \
VNCOPTIONS="-PreferBandwidth -DynamicQualityMin=4 -DynamicQualityMax=7" \
HOME=/home/user \
TERM=xterm \
STARTUPDIR=/dockerstartup \
INST_SCRIPTS=/dockerstartup/install \
KASM_RX_HOME=/dockerstartup/kasmrx \
DEBIAN_FRONTEND=noninteractive \
VNC_COL_DEPTH=24 \
VNC_RESOLUTION=1280x1024 \
VNC_PW=vncpassword \
VNC_USER=user \
VNC_VIEW_ONLY_PW=vncviewonlypassword \
LD_LIBRARY_PATH=/usr/local/lib/ \
OMP_WAIT_POLICY=PASSIVE \
SHELL=/bin/bash \
SINGLE_APPLICATION=0 \
KASMVNC_BUILD_OS=ubuntu \
KASMVNC_BUILD_OS_CODENAME=bionic
EXPOSE $VNC_PORT
WORKDIR $HOME
### REQUIRED STUFF ###
RUN apt-get update && apt-get install -y supervisor xfce4 xfce4-terminal xterm libnss-wrapper gettext wget
RUN apt-get purge -y pm-utils xscreensaver*
RUN echo 'source $STARTUPDIR/generate_container_user' >> $HOME/.bashrc
RUN mkdir -p $STARTUPDIR
COPY builder/startup/ $STARTUPDIR
### START CUSTOM STUFF ####
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 ###
RUN chown -R 1000:0 $HOME
USER 1000
WORKDIR $HOME
ENTRYPOINT [ "/dockerstartup/vnc_startup.sh" ]

View File

@ -1,20 +0,0 @@
FROM ubuntu:focal
ENV STARTUPDIR=/dockerstartup
COPY ./builder/scripts/ /tmp/scripts/
COPY ./debian/changelog /tmp
ARG KASMVNC_PACKAGE_DIR
COPY $KASMVNC_PACKAGE_DIR/kasmvncserver_*.deb /tmp/
RUN /tmp/scripts/install_kasmvncserver_package
RUN apt-get update && apt-get -y install xterm lsb-release
RUN mkdir -p $STARTUPDIR
COPY builder/startup/vnc_startup_barebones.sh $STARTUPDIR
RUN useradd -m foo && addgroup foo ssl-cert
USER foo
ENTRYPOINT "/$STARTUPDIR/vnc_startup_barebones.sh"

View File

@ -0,0 +1 @@
dockerfile.debian.barebones.deb.test

View File

@ -12,16 +12,31 @@ RUN apt-get update && \
RUN apt-get update && apt-get install -y --no-install-recommends tzdata
RUN apt-get update && apt-get -y build-dep xorg-server libxfont-dev
RUN apt-get update && apt-get -y install cmake git vim wget curl
RUN apt-get update && apt-get -y install libpng-dev libtiff-dev libgif-dev libavcodec-dev libssl-dev libxrandr-dev libxcursor-dev
RUN apt-get update && apt-get -y install ninja-build nasm git vim wget curl
RUN apt-get update && apt-get -y install libtbb-dev libpng-dev libtiff-dev libgif-dev libavcodec-dev libssl-dev libxrandr-dev \
libxcursor-dev libavformat-dev libswscale-dev
ENV SCRIPTS_DIR=/tmp/scripts
COPY builder/scripts $SCRIPTS_DIR
RUN $SCRIPTS_DIR/build-webp
RUN $SCRIPTS_DIR/build-libjpeg-turbo
RUN useradd -m docker && echo "docker:docker" | chpasswd && adduser docker sudo
RUN ARCH=$(arch) && \
CMAKE_URL="https://cmake.org/files/v3.22/cmake-3.22.0" && \
if [ "$ARCH" = "x86_64" ]; then \
CMAKE_URL="${CMAKE_URL}-linux-x86_64.sh"; \
elif [ "$ARCH" = "aarch64" ]; then \
CMAKE_URL="${CMAKE_URL}-linux-aarch64.sh"; \
else \
echo "Unsupported architecture: $ARCH" && exit 1; \
fi && \
curl -fsSL $CMAKE_URL -o cmake.sh && \
(echo y; echo n) | bash cmake.sh --prefix=/usr/local --skip-license && \
rm cmake.sh
RUN $SCRIPTS_DIR/build-webp
RUN $SCRIPTS_DIR/build-libjpeg-turbo
COPY --chown=docker:docker . /src/
USER docker

View File

@ -3,7 +3,7 @@ FROM ubuntu:focal
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && \
apt-get -y install vim build-essential devscripts equivs
apt-get -y install vim build-essential devscripts equivs libtbb-dev
# Install build-deps for the package.
COPY ./debian/control /tmp

View File

@ -21,7 +21,7 @@ ENV DISPLAY=:1 \
SHELL=/bin/bash \
SINGLE_APPLICATION=0 \
KASMVNC_BUILD_OS=ubuntu \
KASMVNC_BUILD_OS_CODENAME=bionic
KASMVNC_BUILD_OS_CODENAME=focal
EXPOSE $VNC_PORT

View File

@ -6,7 +6,7 @@ RUN apt-get update && apt-get install -y vim less
RUN apt-get update && apt-get install -y python3-pip
RUN apt-get update && apt-get install -y strace silversearcher-ag xfonts-base
RUN apt-get update && apt-get install -y cinnamon
RUN apt-get update && apt-get install -y mate
RUN apt-get update && apt-get install -y mate wget
RUN useradd -m docker

View File

@ -0,0 +1 @@
dockerfile.debian.barebones.deb.test

View File

@ -12,8 +12,9 @@ RUN apt-get update && \
RUN apt-get update && apt-get install -y --no-install-recommends tzdata
RUN apt-get update && apt-get -y build-dep xorg-server libxfont-dev
RUN apt-get update && apt-get -y install cmake git libgnutls28-dev vim wget tightvncserver curl
RUN apt-get update && apt-get -y install libpng-dev libtiff-dev libgif-dev libavcodec-dev libssl-dev libxrandr-dev libxcursor-dev
RUN apt-get update && apt-get -y install ninja-build cmake nasm git libgnutls28-dev vim wget tightvncserver curl
RUN apt-get update && apt-get -y install libpng-dev libtiff-dev libgif-dev libavcodec-dev libssl-dev libxrandr-dev \
libxcursor-dev libavformat-dev libswscale-dev
ENV SCRIPTS_DIR=/tmp/scripts
COPY builder/scripts $SCRIPTS_DIR

View File

@ -21,7 +21,7 @@ ENV DISPLAY=:1 \
SHELL=/bin/bash \
SINGLE_APPLICATION=0 \
KASMVNC_BUILD_OS=ubuntu \
KASMVNC_BUILD_OS_CODENAME=bionic
KASMVNC_BUILD_OS_CODENAME=jammy
EXPOSE $VNC_PORT

View File

@ -0,0 +1,73 @@
FROM kasmweb/ubuntu-jammy-desktop:develop
ENV KASMVNC_BUILD_OS ubuntu
ENV KASMVNC_BUILD_OS_CODENAME jammy
ENV XORG_VER 21.1.3
ENV XORG_PATCH 21
ENV DEBIAN_FRONTEND noninteractive
EXPOSE 6901
USER root
COPY builder/conf/nginx_kasm.conf /etc/nginx/conf.d/
RUN sed -i 's$# deb-src$deb-src$' /etc/apt/sources.list && \
apt update && \
apt install -y \
ninja-build \
gdb \
valgrind \
rsync \
dos2unix \
socat \
sudo \
libxfont-dev \
cmake \
nasm \
git \
libgnutls28-dev \
vim \
wget \
tightvncserver \
curl \
libpng-dev \
libtiff-dev \
libgif-dev \
libavformat-dev \
libavcodec-dev \
libswscale-dev \
libssl-dev \
libxrandr-dev \
libxcursor-dev \
pkg-config \
libfreetype6-dev \
libxtst-dev \
autoconf \
automake \
libtool \
xutils-dev \
libpixman-1-dev \
libxshmfence-dev \
libxcvt-dev \
libxkbfile-dev \
x11proto-dev \
libgbm-dev \
inotify-tools && \
echo "kasm-user ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
RUN apt install -y nodejs nginx
COPY builder/scripts/build-webp /tmp
COPY builder/scripts/build-libjpeg-turbo /tmp
COPY builder/common.sh /tmp
RUN chmod +x /tmp/build-webp && /tmp/build-webp
RUN chmod +x /tmp/build-libjpeg-turbo && /tmp/build-libjpeg-turbo
USER 1000
WORKDIR /src
ENTRYPOINT /bin/bash

View File

@ -0,0 +1 @@
dockerfile.debian.barebones.deb.test

View File

@ -12,8 +12,9 @@ RUN apt-get update && \
RUN apt-get update && apt-get install -y --no-install-recommends tzdata
RUN apt-get update && apt-get -y build-dep xorg-server libxfont-dev
RUN apt-get update && apt-get -y install cmake git libgnutls28-dev vim wget curl
RUN apt-get update && apt-get -y install libpng-dev libtiff-dev libgif-dev libavcodec-dev libssl-dev libxrandr-dev libxcursor-dev
RUN apt-get update && apt-get -y install ninja-build cmake nasm git libgnutls28-dev vim wget curl
RUN apt-get update && apt-get -y install libpng-dev libtiff-dev libgif-dev libavcodec-dev libssl-dev libxrandr-dev \
libxcursor-dev libavformat-dev libswscale-dev
ENV SCRIPTS_DIR=/tmp/scripts
COPY builder/scripts $SCRIPTS_DIR

View File

@ -1,6 +1,8 @@
FROM node:12-buster
FROM alpine
COPY kasmweb/ /src/www/
RUN apk add npm nodejs
COPY kasmweb/ /src/www
COPY builder/build_www.sh /src/
WORKDIR /src/www

View File

@ -1,7 +1,7 @@
#!/bin/bash
default_os=${default_os:-ubuntu}
default_os_codename=${default_os_codename:-bionic}
default_os_codename=${default_os_codename:-noble}
os=${1:-$default_os}
os_codename=${2:-$default_os_codename}

View File

@ -6,7 +6,7 @@ usage() {
}
process_options() {
local sorted_options=$(getopt -o psh --long perf-test --long shell --long help -- "$@")
local sorted_options=$(getopt -o prsh --long perf-test --long run-test --long shell --long help -- "$@")
eval set -- $sorted_options
while : ; do
@ -16,6 +16,10 @@ process_options() {
entrypoint_executable="--entrypoint=/usr/bin/Xvnc"
shift
;;
-r|--run-test)
run_test=1
shift
;;
-s|--shell)
entrypoint_executable="--entrypoint=bash"
shift

View File

@ -3,25 +3,14 @@
set -euo pipefail
build_and_install() {
export MAKEFLAGS=-j`nproc`
export CFLAGS="-fpic"
cmake -DCMAKE_INSTALL_PREFIX=/usr/local -G"Unix Makefiles"
make
make install
}
install_build_dependencies() {
install_packages cmake gcc
ensure_libjpeg_is_fast
}
ensure_libjpeg_is_fast() {
install_packages nasm
cmake -B build -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_POSITION_INDEPENDENT_CODE=ON -GNinja .
ninja -C build install
}
prepare_libjpeg_source() {
export JPEG_TURBO_RELEASE=$(curl -sX GET "https://api.github.com/repos/libjpeg-turbo/libjpeg-turbo/releases/latest" \
| awk '/tag_name/{print $4;exit}' FS='[""]')
[ -d ./libjpeg-turbo ] && rm -rf ./libjpeg-turbo
mkdir libjpeg-turbo
curl -Ls "https://github.com/libjpeg-turbo/libjpeg-turbo/archive/${JPEG_TURBO_RELEASE}.tar.gz" | \
tar xzvf - -C libjpeg-turbo/ --strip-components=1
@ -31,6 +20,5 @@ prepare_libjpeg_source() {
source_dir=$(dirname "$0")
. "$source_dir/common.sh"
install_build_dependencies
prepare_libjpeg_source
build_and_install

View File

@ -2,22 +2,30 @@
set -euo pipefail
webp_tar_url=https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-1.2.4.tar.gz
WEBP_VERSION="1.5.0"
WEBP_TAR_URL="https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-${WEBP_VERSION}.tar.gz"
WEBP_TAR_FILE="/tmp/libwebp-${WEBP_VERSION}.tar.gz"
WEBP_SRC_DIR="/tmp/libwebp-${WEBP_VERSION}"
prepare_source() {
cd /tmp
wget "$webp_tar_url"
tar -xzf /tmp/libwebp-*
rm /tmp/libwebp-*.tar.gz
cd /tmp/libwebp-*
# Remove old files if they exist
[ -f "$WEBP_TAR_FILE" ] && rm "$WEBP_TAR_FILE"
[ -d "$WEBP_SRC_DIR" ] && rm -rf "$WEBP_SRC_DIR"
wget "$WEBP_TAR_URL"
tar -xzf "$WEBP_TAR_FILE"
cd "$WEBP_SRC_DIR"
}
build_and_install() {
export MAKEFLAGS=-j`nproc`
./configure --enable-static --disable-shared
export MAKEFLAGS=-j$(nproc)
./configure --enable-static --disable-shared --enable-threading --enable-sse2 --enable-neon
make
make install
}
prepare_source
build_and_install

View File

@ -1,9 +1,7 @@
#!/bin/bash
detect_distro() {
if [ -f /etc/centos-release ]; then
DISTRO=centos
elif [ -f /etc/oracle-release ]; then
if [ -f /etc/oracle-release ]; then
DISTRO=oracle
elif [ -f /etc/fedora-release ]; then
DISTRO=fedora
@ -20,7 +18,6 @@ install_packages() {
local install_cmd=no-command-defined
case "$DISTRO" in
centos) install_cmd="yum install -y" ;;
oracle) install_cmd="dnf install -y" ;;
fedora) install_cmd="dnf install -y" ;;
opensuse) install_cmd="zypper install -y" ;;

View File

@ -0,0 +1,30 @@
#!/bin/bash
set -e
install_private_signing_key() {
if echo "$KASMVNC_ALPINE_PRIVATE_KEY" | grep -q -- "$BEGIN_PRIVATE_KEY"; then
echo "$KASMVNC_ALPINE_PRIVATE_KEY" > $APK_KEYS_DIR/kasmvnc_signing_key.rsa
else
echo -e "$BEGIN_PRIVATE_KEY\n$KASMVNC_ALPINE_PRIVATE_KEY\n$END_PRIVATE_KEY" > \
$APK_KEYS_DIR/kasmvnc_signing_key.rsa
fi
}
install_public_signing_key() {
if echo "$KASMVNC_ALPINE_PUBLIC_KEY" | grep -q -- "$BEGIN_PUBLIC_KEY"; then \
echo "$KASMVNC_ALPINE_PUBLIC_KEY" > $APK_KEYS_DIR/kasmvnc_signing_key.rsa.pub
else
echo -e "$BEGIN_PUBLIC_KEY\n$KASMVNC_ALPINE_PUBLIC_KEY\n$END_PUBLIC_KEY" > \
$APK_KEYS_DIR/kasmvnc_signing_key.rsa.pub
fi
}
APK_KEYS_DIR=/etc/apk/keys
BEGIN_PRIVATE_KEY='-----BEGIN PRIVATE KEY-----'
END_PRIVATE_KEY='-----END PRIVATE KEY-----'
BEGIN_PUBLIC_KEY='-----BEGIN PUBLIC KEY-----'
END_PUBLIC_KEY='-----END PUBLIC KEY-----'
install_private_signing_key
install_public_signing_key

View File

@ -10,6 +10,10 @@ is_debian() {
[[ -f /etc/debian_version ]]
}
is_alpine() {
[[ -f /etc/alpine-release ]]
}
check_package_version_exists() {
if ! stat /tmp/kasmvncserver_"$package_version"*.deb; then
>&2 echo "No package found for version $package_version"
@ -42,7 +46,16 @@ install_package_built_for_current_branch_package_version_deb() {
--file /tmp/changelog)
check_package_version_exists
apt-get install -y /tmp/kasmvncserver_"$package_version"*"$tag"*.deb
dpkg_arch=$(dpkg-architecture -q DEB_BUILD_ARCH)
apt-get install -y /tmp/kasmvncserver_"$package_version"*"$tag"*_${dpkg_arch}.deb
}
detect_dnf_command() {
if command -v dnf5 >/dev/null; then
echo dnf install -y --allowerasing
else
echo dnf localinstall -y --allowerasing
fi
}
install_package_built_for_current_branch_package_version_rpm() {
@ -50,15 +63,24 @@ install_package_built_for_current_branch_package_version_rpm() {
$rpm_package_manager install -y rpmdevtools
package_version=$(rpmspec -q --qf '%{version}\n' /tmp/kasmvncserver.spec 2>/dev/null)
package_name=/tmp/kasmvncserver-"$package_version"*.$(arch).rpm
if [[ $rpm_package_manager = "dnf" ]]; then
dnf localinstall -y --allowerasing /tmp/kasmvncserver-"$package_version"*.rpm
local dnf_cmd=$(detect_dnf_command)
$dnf_cmd $package_name
else
yum install -y /tmp/kasmvncserver-"$package_version"*.rpm
yum install -y $package_name
fi
}
install_package_built_for_current_branch_package_version_apk() {
package_version=$(sed -n 's/pkgver=\(.\+\)/\1/p' /tmp/APKBUILD )
apk add /tmp/kasmvncserver-"$package_version"*.apk /tmp/kasmvncserver-doc-"$package_version"*.apk --allow-untrusted
}
if is_debian ; then
install_package_built_for_current_branch_package_version_deb
elif is_alpine; then
install_package_built_for_current_branch_package_version_apk
else
install_package_built_for_current_branch_package_version_rpm
fi

View File

@ -19,4 +19,9 @@ set_xterm_to_run
create_kasm_user
vncserver -select-de manual -websocketPort "$VNC_PORT"
vncserver_exit_code=$?
if [ "$RUN_TEST" = 1 ]; then
exit "$vncserver_exit_code"
fi
tail -f "$config_dir"/*.log

30
builder/test-apk-barebones Executable file
View File

@ -0,0 +1,30 @@
#!/bin/bash
set -e
detect_base_image() {
BASE_IMAGE=$(echo "${os}:${os_codename}" | sed 's/\([0-9]\{2\}\)$/.\1/')
}
cd "$(dirname "$0")/.."
. ./builder/process_test_options.sh
. ./builder/common.sh
os="${1:-alpine}"
os_codename="${2:-321}"
detect_build_dir
detect_base_image
docker build --build-arg KASMVNC_PACKAGE_DIR="${build_dir}/${os}_${os_codename}" \
--build-arg RUN_TEST="$run_test" \
--build-arg BASE_IMAGE="$BASE_IMAGE" \
-t kasmvnctester_barebones_${os}:$os_codename \
-f builder/dockerfile.${os}_${os_codename}.barebones.apk.test .
echo
detect_interactive
docker run $interactive -p "443:$VNC_PORT" --rm -e "VNC_USER=foo" -e "VNC_PW=foobar" \
-e "VNC_PORT=$VNC_PORT" \
-e RUN_TEST="$run_test" \
$entrypoint_executable \
kasmvnctester_barebones_${os}:$os_codename \
$entrypoint_args

42
builder/test-barebones Executable file
View File

@ -0,0 +1,42 @@
#!/bin/bash
set -eo pipefail
create_gitlab_report() {
local error="$1"
failure_report=$(cat <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<testsuite name="Run test" tests="1" failures="1" errors="0" skipped="0">
<testcase classname="$os_fullname" name="Test run">
<failure type="description">${error}</failure>
</testcase>
</testsuite>
EOF
)
}
write_gitlab_report() {
echo "$failure_report" > run_test/"${os}_${os_codename}.xml"
}
saved_options=("$@")
. ./builder/process_test_options.sh
. ./builder/common.sh
os="$1"
os_codename="$2"
os_fullname="${os}_${os_codename}"
detect_package_format
if [ "$run_test" != 1 ]; then
builder/test-${package_format}-barebones "${saved_options[@]}"
exit $?
fi
mkdir -p run_test
if ! builder/test-${package_format}-barebones "${saved_options[@]}" 2>&1 | \
tee run_test/"${os_fullname}.log"; then
create_gitlab_report "$(tail -1 run_test/${os_fullname}.log)"
write_gitlab_report
exit 1
fi

View File

@ -2,18 +2,33 @@
set -e
detect_base_image() {
if [ "$os" = kali ]; then
BASE_IMAGE=kalilinux/kali-rolling:latest
return
fi
BASE_IMAGE="${os}:${os_codename}"
}
cd "$(dirname "$0")/.."
. ./builder/process_test_options.sh
. ./builder/common.sh
os="${1:-debian}"
os_codename="${2:-buster}"
docker build --build-arg KASMVNC_PACKAGE_DIR="builder/build/${os_codename}" \
detect_build_dir
detect_base_image
docker build --build-arg KASMVNC_PACKAGE_DIR="${build_dir}/${os_codename}" \
--build-arg RUN_TEST="$run_test" \
--build-arg BASE_IMAGE="$BASE_IMAGE" \
-t kasmvnctester_barebones_${os}:$os_codename \
-f builder/dockerfile.${os}_${os_codename}.barebones.deb.test .
echo
docker run -it -p "443:$VNC_PORT" --rm -e "VNC_USER=foo" -e "VNC_PW=foobar" \
detect_interactive
docker run $interactive -p "443:$VNC_PORT" --rm -e "VNC_USER=foo" -e "VNC_PW=foobar" \
-e "VNC_PORT=$VNC_PORT" \
-e RUN_TEST="$run_test" \
$entrypoint_executable \
kasmvnctester_barebones_${os}:$os_codename \
$entrypoint_args

Some files were not shown because too many files have changed in this diff Show More