2020-12-24 20:54:58 +01:00
|
|
|
## REQIUREMENTS
|
2020-09-20 14:16:44 +02:00
|
|
|
Docker CE
|
|
|
|
|
2021-04-13 11:58:52 +02:00
|
|
|
# Build a deb/rpm package
|
|
|
|
```
|
|
|
|
# builder/build-package <os> <os_codename>
|
|
|
|
# os_codename is what "lsb_release -c" outputs, e.g. buster, focal.
|
|
|
|
# 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
|
|
|
|
```
|
|
|
|
|
2021-04-13 12:47:10 +02:00
|
|
|
# Build and test a package
|
2021-01-12 11:26:59 +01:00
|
|
|
```
|
2021-04-13 12:47:10 +02:00
|
|
|
builder/build-and-test-deb ubuntu focal
|
|
|
|
builder/build-and-test-rpm centos core
|
2020-12-24 20:54:58 +01:00
|
|
|
```
|
2020-09-20 14:16:44 +02:00
|
|
|
|
2021-04-13 12:57:10 +02:00
|
|
|
Open browser and point to https://localhost:443/ or https://\<ip-address\>:443/
|
2021-04-13 12:47:10 +02:00
|
|
|
|
|
|
|
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.
|
2020-09-20 14:16:44 +02:00
|
|
|
|
2021-04-13 12:47:10 +02:00
|
|
|
# Test a package
|
|
|
|
|
2021-04-13 13:04:52 +02:00
|
|
|
If you want to test deb/rpm package you've already built, please use this:
|
2021-04-13 12:47:10 +02:00
|
|
|
```
|
|
|
|
builder/test-deb ubuntu focal
|
2020-12-24 20:54:58 +01:00
|
|
|
```
|
2021-04-13 12:57:10 +02:00
|
|
|
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/
|
2021-04-13 12:47:10 +02:00
|
|
|
|
|
|
|
# Package development
|
|
|
|
|
|
|
|
## deb/rpm package building and testing
|
2021-01-12 11:26:59 +01:00
|
|
|
|
2021-04-13 12:47:10 +02:00
|
|
|
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
|
2020-12-24 20:54:58 +01:00
|
|
|
```
|
2020-09-20 14:16:44 +02:00
|
|
|
|
2021-04-13 14:59:37 +02:00
|
|
|
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
|
2021-04-13 12:47:10 +02:00
|
|
|
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.
|
|
|
|
|
2021-04-13 14:59:37 +02:00
|
|
|
If you're working on a deb/rpm package, testing that it has all the necessary
|
2021-04-13 12:47:10 +02:00
|
|
|
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
|
|
|
|
```
|