Building: describe how to build and test packages

pull/35/head
Dmitry Maksyoma 4 years ago
parent f532e3244b
commit e7f8caa752

@ -1,12 +1,6 @@
## REQIUREMENTS ## REQIUREMENTS
Docker CE Docker CE
# Build the www webpack
```
docker build -t kasmweb/www -f builder/dockerfile.www.build .
docker run -it --rm -v $PWD/builder/www:/build kasmweb/www:latest
```
# Build a deb/rpm package # Build a deb/rpm package
``` ```
# builder/build-package <os> <os_codename> # builder/build-package <os> <os_codename>
@ -22,29 +16,55 @@ builder/build-package centos core # CentOS 7
builder/build-package fedora thirtythree builder/build-package fedora thirtythree
``` ```
# build the docker image # Build and test a package
``` ```
cd /src_code_root builder/build-and-test-deb ubuntu focal
docker build -t kasmvncbuilder:18.04 -f builder/dockerfile.ubuntu1804.build . builder/build-and-test-rpm centos core
``` ```
### Run the builder open browser and point to https://<ip-address>/
```sh
mkdir -p builder/build 3 default users are created:
docker run -v /tmp:/build --rm kasmvncbuilder:18.04 * 'foo' with default password 'foobar'. It can use mouse and keyboard.
cp /tmp/build/kasmvnc.ubuntu_18.04.tar.gz builder/build/ * 'foo-ro' with default password 'foobar'. It can only view.
``` * 'foo-owner' with default password 'foobar'. It can manage other users.
### Build test desktop container # Test a package
```sh
cd builder If you want to test deb/rpm package you already built, please use this:
docker build -t kasmvnctester:18.04 -f dockerfile.ubuntu1804.test . ```
builder/test-deb ubuntu focal
``` ```
It will install the package inside a new container.
# Package development
## deb/rpm package building and testing
### run an instance of the new destkop First, a tarball is built, and then its files are copied to deb/rpm package as
```sh it is being built.
docker run -it -p 443:8443 --rm -e "VNC_USER=username" -e "VNC_PW=password123" kasmvnctester:18.04 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
``` ```
open browser and point to https://<ip-address>/vnc.html `build-and-test-deb` is good to do the whole dev lifecycle, but to iterate
The username and password were set in the docker run command quickly, you'll need to skip building 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 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
```

Loading…
Cancel
Save