KasmVNC/builder
2025-04-28 23:43:30 +05:00
..
scripts KASM-7194 Removed package installation from this script since they're already included in the Docker image. Switched to Ninja for faster builds 2025-04-17 23:17:39 +05:00
startup vncserver: more debug output for xstartup 2023-09-03 21:35:13 +12:00
build-and-test-deb Move build-and-test-* to builder/ 2021-02-28 21:28:14 +13:00
build-and-test-rpm Move build-and-test-* to builder/ 2021-02-28 21:28:14 +13:00
build-apk Revert "KASM-6904 Print env" 2025-03-09 17:21:47 +13:00
build-apk-inside-docker KASM-6904 Alpine: use common naming for kasmvncserver-doc package 2025-03-13 20:19:55 +13:00
build-deb Feature/kasm 1838 libjpeg turbo from source (#49) 2021-09-07 08:11:21 -04:00
build-deb-inside-docker Resolve KASM-2301 "Feature/ upload debug packages" 2022-02-11 14:57:25 +00:00
build-package Resolve KASM-4031 "Feature/ alpine 317" 2023-03-03 11:09:08 +00:00
build-rpm Feature/kasm 1838 libjpeg turbo from source (#49) 2021-09-07 08:11:21 -04:00
build-rpm-inside-docker Resolve KASM-4031 "Feature/ alpine 317" 2023-03-03 11:09:08 +00:00
build-tarball Resolve KASM-2301 "Feature/ upload debug packages" 2022-02-11 14:57:25 +00:00
build.sh KASM-7125 fixed issue with rebuilding Xvnc, switched to simplier webp mix math. 2025-04-24 16:50:44 +00:00
build_and_deploy_kasm.sh Initial commit 2020-09-20 12:16:44 +00:00
build_www.sh Resolve KASM-6894 "Feature/ remove webpack to reduce vulnerabilities" 2025-02-23 00:48:51 +00:00
bump-package-version KASM-6904 bump-package-version: support Alpine 2025-03-13 17:19:38 +13:00
bump-package-version-apk KASM-7051 bump-package-version-apk: fix to produce pkgrel 2025-03-20 17:23:11 +13:00
bump-package-version-deb Refactor: extract bump-package-version-deb(1) 2022-03-25 23:59:47 +13:00
bump-package-version-inside-docker-deb Add bump-package-version(1) and document it (#74) 2021-11-05 10:05:13 -04:00
bump-package-version-rpm KASM-6518 Remove CentOS support 2025-01-31 18:22:01 +13:00
common.sh Config-based KasmVNC 2022-08-19 17:54:11 +00:00
devenv-vncserver Config-based KasmVNC 2022-08-19 17:54:11 +00:00
dockerfile.alpine_317.apk.build KASM-6904 Alpine 3.17 build apk package 2025-03-09 18:24:59 +13:00
dockerfile.alpine_318.apk.build KASM-6904 Alpine 3.18 build apk package 2025-03-09 17:56:42 +13:00
dockerfile.alpine_318.build KASM-6984 Add ffmpeg-dev to Alpine build Dockerfiles 2025-04-28 23:43:30 +05:00
dockerfile.alpine_319.apk.build KASM-6904 Refactor 2025-03-09 17:52:52 +13:00
dockerfile.alpine_319.build KASM-6984 Add ffmpeg-dev to Alpine build Dockerfiles 2025-04-28 23:43:30 +05:00
dockerfile.alpine_320.apk.build KASM-6904 Alpine 3.20 build apk package 2025-03-09 18:29:57 +13:00
dockerfile.alpine_320.build KASM-6984 Add ffmpeg-dev to Alpine build Dockerfiles 2025-04-28 23:43:30 +05:00
dockerfile.alpine_321.apk.build KASM-6904 Alpine 3.21 build apk package 2025-03-09 18:31:36 +13:00
dockerfile.alpine_321.build KASM-6984 Add ffmpeg-dev to Alpine build Dockerfiles 2025-04-28 23:43:30 +05:00
dockerfile.bump-package-version Add bump-package-version(1) and document it (#74) 2021-11-05 10:05:13 -04:00
dockerfile.debian_bookworm.build KASM-6984 Update dependencies in Dockerfile for Debian 2025-04-28 23:43:30 +05:00
dockerfile.debian_bookworm.deb.build KASM-6984 Add depedencies to docker images 2025-04-28 23:43:30 +05:00
dockerfile.debian_bookworm.deb.test KASM-4421 update opensuse to 15.5, add bookworm Alpine 3.18 and Fedora 38 2023-06-02 14:08:40 -04:00
dockerfile.debian_bullseye.build KASM-6984 Update dependencies in Dockerfile for Debian 2025-04-28 23:43:30 +05:00
dockerfile.debian_bullseye.deb.build KASM-6984 Add depedencies to docker images 2025-04-28 23:43:30 +05:00
dockerfile.debian_bullseye.deb.test Config-based KasmVNC 2022-08-19 17:54:11 +00:00
dockerfile.debian_buster.barebones.deb.test Config-based KasmVNC 2022-08-19 17:54:11 +00:00
dockerfile.debian_buster.build KASM-7194 Add NASM to all builder Dockerfiles 2025-04-17 23:40:47 +05:00
dockerfile.debian_buster.deb.build Feature/kasm 1838 libjpeg turbo from source (#49) 2021-09-07 08:11:21 -04:00
dockerfile.debian_buster.deb.test Refactor 2023-01-26 18:52:02 +13:00
dockerfile.fedora_forty.build KASM-6984 Add libavformat-free-devel and libswscale-free-devel dependencies 2025-04-28 23:43:30 +05:00
dockerfile.fedora_forty.rpm.build Resolve KASM-5907 "Feature/ fedora 40" 2024-04-25 15:03:54 +00:00
dockerfile.fedora_fortyone.build KASM-6984 Add libavformat-free-devel and libswscale-free-devel dependencies 2025-04-28 23:43:30 +05:00
dockerfile.fedora_fortyone.rpm.build KASM-6852 add Fedora 41 buiild logic 2025-01-21 14:53:42 -05:00
dockerfile.fedora_thirtynine.build KASM-6984 Add libavformat-free-devel and libswscale-free-devel dependencies 2025-04-28 23:43:30 +05:00
dockerfile.fedora_thirtynine.rpm.build Resolve KASM-5403 "Feature/ fedora 39" 2024-01-03 17:02:12 +00:00
dockerfile.kali_kali-rolling.build KASM-6984 Add depedencies to docker images 2025-04-28 23:43:30 +05:00
dockerfile.kali_kali-rolling.deb.build KASM-6984 Added dependencies 2025-04-28 23:43:30 +05:00
dockerfile.kali_kali-rolling.deb.test Config-based KasmVNC 2022-08-19 17:54:11 +00:00
dockerfile.opensuse_15.barebones.rpm.test KASM-4421 update opensuse to 15.5, add bookworm Alpine 3.18 and Fedora 38 2023-06-02 14:08:40 -04:00
dockerfile.opensuse_15.build KASM-6984 Add depedencies to docker images 2025-04-28 23:43:30 +05:00
dockerfile.opensuse_15.rpm.build KASM-4421 update opensuse to 15.5, add bookworm Alpine 3.18 and Fedora 38 2023-06-02 14:08:40 -04:00
dockerfile.oracle_8.barebones.rpm.test Config-based KasmVNC 2022-08-19 17:54:11 +00:00
dockerfile.oracle_8.build KASM-7194 Add ninja-build and libSM-devel to Docker build files 2025-04-17 23:40:47 +05:00
dockerfile.oracle_8.rpm.build Resolve KASM-4031 "Feature/ alpine 317" 2023-03-03 11:09:08 +00:00
dockerfile.oracle_9.barebones.rpm.test Fix Oracle 9 barebones test 2023-04-01 23:33:39 +13:00
dockerfile.oracle_9.build KASM-6984 Add FFmpeg support and update dependencies for benchmarking on oracle 9 2025-04-28 23:43:30 +05:00
dockerfile.oracle_9.rpm.build KASM-6122 fix oracle build 2024-06-19 05:49:59 -04:00
dockerfile.ubuntu_focal.barebones.deb.test Support --perf-test, --shell in barebones test scripts 2023-01-25 18:30:56 +13:00
dockerfile.ubuntu_focal.build KASM-6984 Added dependencies 2025-04-28 23:43:30 +05:00
dockerfile.ubuntu_focal.deb.build KASM-6984 Add FFmpeg libraries to Ubuntu focal build dependencies. Added new dependencies: libavformat-dev and libswscale-dev 2025-04-28 23:43:30 +05:00
dockerfile.ubuntu_focal.deb.test KASM-6518 Remove Bionic support 2025-01-31 17:54:05 +13:00
dockerfile.ubuntu_focal.specs.test KASM-6984 Update file download path. Update CI 2025-04-28 23:43:30 +05:00
dockerfile.ubuntu_focal.test Remove cruft 2023-01-26 19:51:36 +13:00
dockerfile.ubuntu_focal.vncserver_devenv.test Resolve KASM-4489 "Feature/ watermark time" 2023-07-26 23:55:06 +00:00
dockerfile.ubuntu_jammy.build KASM-6984 Add depedencies to docker images 2025-04-28 23:43:30 +05:00
dockerfile.ubuntu_jammy.deb.build KASM-6984 Add depedencies to docker images 2025-04-28 23:43:30 +05:00
dockerfile.ubuntu_jammy.deb.test KASM-6518 Remove Bionic support 2025-01-31 17:54:05 +13:00
dockerfile.ubuntu_jammy.dev KASM-6984 Update Dockerfile to include FFmpeg libraries 2025-04-28 23:43:30 +05:00
dockerfile.ubuntu_jammy.test Remove cruft 2023-01-26 19:51:36 +13:00
dockerfile.ubuntu_noble.build KASM-6984 Add depedencies to docker images 2025-04-28 23:43:30 +05:00
dockerfile.ubuntu_noble.deb.build KASM-6984 Add depedencies to docker images 2025-04-28 23:43:30 +05:00
dockerfile.ubuntu_noble.deb.test Resolve KASM-5854 "Feature/ ubuntu noble" 2024-04-15 18:16:38 +00:00
dockerfile.ubuntu_noble.test Resolve KASM-5854 "Feature/ ubuntu noble" 2024-04-15 18:16:38 +00:00
dockerfile.www.build Resolve KASM-6894 "Feature/ remove webpack to reduce vulnerabilities" 2025-02-23 00:48:51 +00:00
os_ver_cli.sh KASM-6518 Remove Bionic support 2025-01-31 17:54:05 +13:00
process_test_options.sh Support --perf-test, --shell in test-deb, test-rpm 2023-01-25 18:28:53 +13:00
README.md KASM-6518 Remove CentOS support 2025-01-31 18:22:01 +13:00
run-specs-inside-docker Config-based KasmVNC 2022-08-19 17:54:11 +00:00
test-deb Support --perf-test, --shell in test-deb, test-rpm 2023-01-25 18:28:53 +13:00
test-deb-barebones Support --perf-test, --shell in barebones test scripts 2023-01-25 18:30:56 +13:00
test-rpm Support --perf-test, --shell in test-deb, test-rpm 2023-01-25 18:28:53 +13:00
test-rpm-barebones KASM-6518 Remove CentOS support 2025-01-31 18:22:01 +13:00
test-vncserver Config-based KasmVNC 2022-08-19 17:54:11 +00:00

REQIUREMENTS

Docker CE

Build a deb/rpm package

# builder/build-package <os> <os_codename> <build_tag>
# 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 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
# * without build_tag: kasmvncserver_0.9.1~beta-1_amd64.deb
# You need to have .build and .deb.build for the build_tag.
#
# Packages will be placed under builder/build/

builder/build-package ubuntu focal
builder/build-package debian buster
builder/build-package debian bullseye
builder/build-package kali kali-rolling
builder/build-package fedora thirtythree

Build and test a package

builder/build-and-test-deb ubuntu focal
builder/build-and-test-rpm oracle 8

Open browser and point to https://localhost:443/ or https://<ip-address>:443/

3 default users are created:

  • 'foo' with default password 'foobar'. It can use mouse and keyboard.
  • 'foo-ro' with default password 'foobar'. It can only view.
  • 'foo-owner' with default password 'foobar'. It can manage other users.

Test a package

If you want to test deb/rpm package you've already built, please use this:

builder/test-deb ubuntu focal

It will install the package inside a new container and run KasmVNC.

Open browser and point to https://localhost:443/ or https://<ip-address>:443/

Debugging

To debug a test container, run test-deb ubuntu focal -s or test-deb ubuntu focal --shell. It runs a shell instead of starting KasmVNC.

Testing performance

To run a performance test, add -p option:

builder/test-deb ubuntu focal -p

Package development

deb/rpm package building and testing

First, a tarball is built, and then its files are copied to deb/rpm package as it is being built. Package testing stage installs the deb/rpm package in a fresh docker container and runs KasmVNC.

builder/build-tarball debian buster
builder/build-deb debian buster
builder/test-deb debian buster

Use build-and-test-deb to perform the whole dev lifecycle, but to iterate quickly, you'll need to skip building the tarball (which takes a long time), and just build your deb/rpm with build-deb and test with test-deb.

build-rpm and test-rpm are also available.

Ensuring packages have all dependencies they need.

If you're working on a deb/rpm package, testing that it has all the necessary dependencies is done via testing in a barebones environment (read: no XFCE). In this way we can be sure that runtime dependencies aren't met accidentally by packages installed with XFCE.

builder/test-deb-barebones ubuntu focal

Preparing a release

Deb and rpm packages need their versions bumped to the new release version. It can be done with:

builder/bump-package-version 0.9.4-beta

This will update corresponding package files, use git diff to see changes.

If you've ran the command and curious about Debian version specifics, here's an explanation: Deb version will be 0.9.4~beta-1. ~ (and not -) is required by packaging guidelines, and -1 is Debian package revision for 0.9.4 upstream release. If a Debian-specific patch was later added on top of 0.9.4, it'd be -2 for the next Debian version. Rpm has a corresponding revision in its .spec file.

CI development

S3 upload code is extracted to various files in .ci. It's possible to iterate locally by doing stuff like this:

bash -c '
. .ci/upload.sh;
prepare_upload_filename "focal/kasmvncserver_0.9.1~beta-1+libjpeg-turbo-latest_amd64.deb";
echo $upload_filename;'

vncserver development

Building a Ubuntu Focal package

builder/build-package ubuntu focal

You don't need to build-package every time you change something, but you need Xvnc and other files.

Running a development environment

builder/devenv-vncserver

devenv-vncserver starts a dockerized development environment. Edit vncserver, its modules, and configuration files as usual. When you runvncserver, not /usr/bin/vncserver will be used, but ./unix/vncserver. Same for configuration files.

Python specs can be run with ty alias inside devenv.

Debug output

To see vncserver output, run ty -d. Anything you print inside vncserver with say should be visible that way.

Finding which spec produces a warning

By default, each passing test is represented as a dot. -v flag causes tests to emit test descriptions alongside the program's output. Run ty -v.

ARM

KasmVNC is supported on ARM, however, the build process needs to be broken into two parts with one occuring on a x64 system and the other on an ARM system. All our testing and official builds are done on AWS Graviton instances.

Build www code on x86 System

The www code is webpacked for performance and thus requires building. There are NPM packages, phantomjs, which do not have an ARM build. Therefore, this must be built on x86 and then copied over to the ARM system for final packaging.

cd ~/KasmVNC
mkdir builder/www
sudo docker build -t kasmweb/www -f builder/dockerfile.www.build .
sudo docker run --rm -v $PWD/builder/www:/build kasmweb/www:latest
cd builder
tar -zcvf /tmp/kasm_www.tar.gz www

Now transfer kasm_www.tar.gz to the ARM system.

Build KasmVNC ARM

These instructions assume KasmVNC has been cloned at $HOME and kasm_www.tar.gz has been placed at $HOME as well, adjust for your environment.

cd ~
tar -zxf kasm_www.tar.gz -C KasmVNC/builder/
cd KasmVNC
sudo builder/build-package ubuntu focal

The resulting deb package can be found under ~/KasmVNC/builder/build/focal Replace focal with noble to build for Ubuntu 24.04LTS.