KasmVNC/builder
Ryan Kuba f1bdfb5ab5 Merge branch 'master' into 'feature/KASM-3806_hw3d'
# Conflicts:
#   builder/build.sh
2023-03-02 19:52:20 +00:00
..
scripts Config-based KasmVNC 2022-08-19 17:54:11 +00:00
startup Config-based KasmVNC 2022-08-19 17:54:11 +00:00
build_and_deploy_kasm.sh Initial commit 2020-09-20 12:16:44 +00:00
build_www.sh remove vnc_lite.html 2022-04-05 16:02:37 +00: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-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 Feature/kasm 1838 libjpeg turbo from source (#49) 2021-09-07 08:11:21 -04:00
build-rpm Feature/kasm 1838 libjpeg turbo from source (#49) 2021-09-07 08:11:21 -04:00
build-rpm-inside-docker build el8 x86_64 and aarch64 rpms 2022-03-26 12:49:18 -07:00
build-tarball Resolve KASM-2301 "Feature/ upload debug packages" 2022-02-11 14:57:25 +00:00
build.sh Merge branch 'master' into 'feature/KASM-3806_hw3d' 2023-03-02 19:52:20 +00:00
bump-package-version Refactor: extract bump-package-version-deb(1) 2022-03-25 23:59:47 +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 Resolve KASM-2437 "Feature/ opensuse 15 images" 2022-04-04 16:31:55 +00: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.bump-package-version Add bump-package-version(1) and document it (#74) 2021-11-05 10:05:13 -04:00
dockerfile.centos_core.barebones.rpm.test Config-based KasmVNC 2022-08-19 17:54:11 +00:00
dockerfile.centos_core.build Resolve KASM-1883 "Feature/ x proxy" 2022-04-07 13:01:14 +00:00
dockerfile.centos_core.rpm.build Rpm: run rpmlint after building rpm 2021-02-12 23:07:03 +13:00
dockerfile.centos_core.rpm.test Config-based KasmVNC 2022-08-19 17:54:11 +00:00
dockerfile.debian_bullseye.build Resolve KASM-1883 "Feature/ x proxy" 2022-04-07 13:01:14 +00:00
dockerfile.debian_bullseye.deb.build Feature/kasm 1838 libjpeg turbo from source (#49) 2021-09-07 08:11:21 -04: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 Resolve KASM-1883 "Feature/ x proxy" 2022-04-07 13:01:14 +00: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 Config-based KasmVNC 2022-08-19 17:54:11 +00:00
dockerfile.fedora_thirtyseven.barebones.rpm.test Resolve KASM-4032 "Feature/ build fedora 37" 2023-02-24 12:02:28 +00:00
dockerfile.fedora_thirtyseven.build Resolve KASM-4032 "Feature/ build fedora 37" 2023-02-24 12:02:28 +00:00
dockerfile.fedora_thirtyseven.rpm.build Resolve KASM-4032 "Feature/ build fedora 37" 2023-02-24 12:02:28 +00:00
dockerfile.fedora_thirtyseven.rpm.test Resolve KASM-4032 "Feature/ build fedora 37" 2023-02-24 12:02:28 +00:00
dockerfile.kali_kali-rolling.build KASM-3184 force the use of gcc11 2022-09-07 10:11:06 +00:00
dockerfile.kali_kali-rolling.deb.build Feature/kasm 1838 libjpeg turbo from source (#49) 2021-09-07 08:11:21 -04:00
dockerfile.kali_kali-rolling.deb.test Config-based KasmVNC 2022-08-19 17:54:11 +00:00
dockerfile.opensuse_15.barebones.rpm.test openSUSE: speed up package building and testing 2022-11-25 01:22:28 +13:00
dockerfile.opensuse_15.build KASM-3806 fix builds and deps for oracle and opensuse 2023-03-02 11:45:21 -08:00
dockerfile.opensuse_15.rpm.build openSUSE: speed up package building and testing 2022-11-25 01:22:28 +13:00
dockerfile.oracle_8.barebones.rpm.test Config-based KasmVNC 2022-08-19 17:54:11 +00:00
dockerfile.oracle_8.build KASM-3806 fix builds and deps for oracle and opensuse 2023-03-02 11:45:21 -08:00
dockerfile.oracle_8.rpm.build build el8 x86_64 and aarch64 rpms 2022-03-26 12:49:18 -07:00
dockerfile.ubuntu1604.build Slash a minute off tarball build 2021-08-17 00:00:55 +12:00
dockerfile.ubuntu_bionic.build Resolve KASM-1883 "Feature/ x proxy" 2022-04-07 13:01:14 +00:00
dockerfile.ubuntu_bionic.deb.build Feature/kasm 1838 libjpeg turbo from source (#49) 2021-09-07 08:11:21 -04:00
dockerfile.ubuntu_bionic.deb.test Config-based KasmVNC 2022-08-19 17:54:11 +00:00
dockerfile.ubuntu_bionic.test Config-based KasmVNC 2022-08-19 17:54:11 +00:00
dockerfile.ubuntu_bionic+libjpeg-turbo_latest.build Resolve KASM-1883 "Feature/ x proxy" 2022-04-07 13:01:14 +00:00
dockerfile.ubuntu_bionic+libjpeg-turbo_latest.deb.build Config-based KasmVNC 2022-08-19 17:54:11 +00:00
dockerfile.ubuntu_bionic+libjpeg-turbo_latest.deb.test Config-based KasmVNC 2022-08-19 17:54:11 +00:00
dockerfile.ubuntu_focal.barebones.deb.test Config-based KasmVNC 2022-08-19 17:54:11 +00:00
dockerfile.ubuntu_focal.build Resolve KASM-2801 "Feature/ remove libnettle dependency" 2022-07-08 14:13:05 +00:00
dockerfile.ubuntu_focal.deb.build Feature/kasm 1838 libjpeg turbo from source (#49) 2021-09-07 08:11:21 -04:00
dockerfile.ubuntu_focal.deb.test Config-based KasmVNC 2022-08-19 17:54:11 +00:00
dockerfile.ubuntu_focal.specs.test Config-based KasmVNC 2022-08-19 17:54:11 +00:00
dockerfile.ubuntu_focal.test Config-based KasmVNC 2022-08-19 17:54:11 +00:00
dockerfile.ubuntu_focal.vncserver_devenv.test Config-based KasmVNC 2022-08-19 17:54:11 +00:00
dockerfile.ubuntu_jammy.build Jammy build 2022-06-08 22:46:03 +12:00
dockerfile.ubuntu_jammy.deb.build Jammy build 2022-06-08 22:46:03 +12:00
dockerfile.ubuntu_jammy.deb.test Config-based KasmVNC 2022-08-19 17:54:11 +00:00
dockerfile.ubuntu_jammy.test Jammy build 2022-06-08 22:46:03 +12:00
dockerfile.www.build added dockerfile build process for www 2021-01-10 19:03:13 +00:00
os_ver_cli.sh Config-based KasmVNC 2022-08-19 17:54:11 +00:00
README.md Config-based KasmVNC 2022-08-19 17:54:11 +00:00
run-specs-inside-docker Config-based KasmVNC 2022-08-19 17:54:11 +00:00
test-deb Config-based KasmVNC 2022-08-19 17:54:11 +00:00
test-deb-barebones Config-based KasmVNC 2022-08-19 17:54:11 +00:00
test-rpm Config-based KasmVNC 2022-08-19 17:54:11 +00:00
test-rpm-barebones Config-based KasmVNC 2022-08-19 17:54:11 +00: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 Bionic). 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 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

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/

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 "bionic/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 bionic

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.