rebase and fix conflicts
						commit
						252fc2f20c
					
				@ -0,0 +1,20 @@
 | 
				
			|||||||
 | 
					---
 | 
				
			||||||
 | 
					name: Feature request
 | 
				
			||||||
 | 
					about: Suggest an idea for this project
 | 
				
			||||||
 | 
					title: ''
 | 
				
			||||||
 | 
					labels: ''
 | 
				
			||||||
 | 
					assignees: ''
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					**Is your feature request related to a problem? Please describe.**
 | 
				
			||||||
 | 
					A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					**Describe the solution you'd like**
 | 
				
			||||||
 | 
					A clear and concise description of what you want to happen.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					**Describe alternatives you've considered**
 | 
				
			||||||
 | 
					A clear and concise description of any alternative solutions or features you've considered.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					**Additional context**
 | 
				
			||||||
 | 
					Add any other context or screenshots about the feature request here.
 | 
				
			||||||
@ -0,0 +1,27 @@
 | 
				
			|||||||
 | 
					---
 | 
				
			||||||
 | 
					name: Installation Issue
 | 
				
			||||||
 | 
					about: Create a report about an installation issue
 | 
				
			||||||
 | 
					title: ''
 | 
				
			||||||
 | 
					labels: ''
 | 
				
			||||||
 | 
					assignees: ''
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					**Describe the bug**
 | 
				
			||||||
 | 
					A clear and concise description of what the issue is.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					**System Description**
 | 
				
			||||||
 | 
					Provide the output of 
 | 
				
			||||||
 | 
					```bash
 | 
				
			||||||
 | 
					cat /etc/os-release
 | 
				
			||||||
 | 
					uname -a
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					**KasmVNC Details**
 | 
				
			||||||
 | 
					Provide the filename of the package you installed KasmVNC with. The filename includes important details like the OS, architecture, and commit sha.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					**Installation Details**
 | 
				
			||||||
 | 
					Provide the commands used to install the KasmVNC package and the output of those commands.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					**Additional context**
 | 
				
			||||||
 | 
					Add any other context about the problem here.
 | 
				
			||||||
@ -0,0 +1,46 @@
 | 
				
			|||||||
 | 
					---
 | 
				
			||||||
 | 
					name: Report a bug or issue with KasmVNC
 | 
				
			||||||
 | 
					about: Create a bug/issue report on KasmVNC
 | 
				
			||||||
 | 
					title: ''
 | 
				
			||||||
 | 
					labels: ''
 | 
				
			||||||
 | 
					assignees: ''
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					**Describe the bug**
 | 
				
			||||||
 | 
					A clear and concise description of what the issue is.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					**System Description**
 | 
				
			||||||
 | 
					Provide the output of 
 | 
				
			||||||
 | 
					```bash
 | 
				
			||||||
 | 
					cat /etc/os-release
 | 
				
			||||||
 | 
					uname -a
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					**KasmVNC Details**
 | 
				
			||||||
 | 
					Provide the filename of the package you installed KasmVNC with. The filename includes important details like the OS, architecture, and commit sha.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Provide the output of this command.
 | 
				
			||||||
 | 
					```bash
 | 
				
			||||||
 | 
					Xvnc -version
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					**To Reproduce**
 | 
				
			||||||
 | 
					Steps to reproduce the behavior (for non-installation issues):
 | 
				
			||||||
 | 
					1. Go to '...'
 | 
				
			||||||
 | 
					2. Click on '....'
 | 
				
			||||||
 | 
					3. Scroll down to '....'
 | 
				
			||||||
 | 
					4. See error
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					**Expected behavior**
 | 
				
			||||||
 | 
					A clear and concise description of what you expected to happen.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					**Browser**
 | 
				
			||||||
 | 
					If this is a problem with the KasmVNC client, provide details about the browser you are accessing KasmVNC from.
 | 
				
			||||||
 | 
					 - Device: [e.g. iPhone6]
 | 
				
			||||||
 | 
					 - OS: [e.g. Windows 11]
 | 
				
			||||||
 | 
					 - Browser [e.g. chrome, safari, edge]
 | 
				
			||||||
 | 
					 - Version [e.g. 22]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					**Additional context**
 | 
				
			||||||
 | 
					Add any other context about the problem here.
 | 
				
			||||||
@ -0,0 +1,17 @@
 | 
				
			|||||||
 | 
					#!/bin/bash
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					set -e
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					. 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)
 | 
				
			||||||
 | 
					docker run --rm -v "$source_dir":/src --user $L_UID:$L_GID \
 | 
				
			||||||
 | 
					  kasmvnc_apkbuilder_${os}:${os_codename} /bin/bash -c \
 | 
				
			||||||
 | 
					  '/src/builder/build-apk-inside-docker'
 | 
				
			||||||
@ -0,0 +1,11 @@
 | 
				
			|||||||
 | 
					#!/bin/bash
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					set -e
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					os=alpine
 | 
				
			||||||
 | 
					os_codename=$(cat /etc/os-release | awk '/VERSION_ID/' | grep -o '[[:digit:]]' | tr -d '\n' | head -c 3)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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
 | 
				
			||||||
@ -0,0 +1,7 @@
 | 
				
			|||||||
 | 
					FROM alpine:3.17
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					RUN apk add shadow bash
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					RUN useradd -m docker && echo "docker:docker" | chpasswd
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					USER docker
 | 
				
			||||||
@ -0,0 +1,76 @@
 | 
				
			|||||||
 | 
					FROM alpine:3.17
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					ENV KASMVNC_BUILD_OS alpine
 | 
				
			||||||
 | 
					ENV KASMVNC_BUILD_OS_CODENAME 317
 | 
				
			||||||
 | 
					ENV XORG_VER 1.20.14
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					RUN useradd -m docker && echo "docker:docker" | chpasswd
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					COPY --chown=docker:docker . /src/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					USER docker
 | 
				
			||||||
 | 
					ENTRYPOINT ["/src/builder/build.sh"]
 | 
				
			||||||
@ -1,4 +1,4 @@
 | 
				
			|||||||
FROM fedora:33
 | 
					FROM fedora:37
 | 
				
			||||||
 | 
					
 | 
				
			||||||
ENV STARTUPDIR=/dockerstartup
 | 
					ENV STARTUPDIR=/dockerstartup
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -0,0 +1,83 @@
 | 
				
			|||||||
 | 
					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 \
 | 
				
			||||||
 | 
					    libjpeg-turbo-devel \
 | 
				
			||||||
 | 
					    libjpeg-turbo-static \
 | 
				
			||||||
 | 
					    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
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					RUN useradd -m docker && echo "docker:docker" | chpasswd
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					COPY --chown=docker:docker . /src/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					USER docker
 | 
				
			||||||
 | 
					ENTRYPOINT ["/src/builder/build.sh"]
 | 
				
			||||||
@ -1,11 +1,11 @@
 | 
				
			|||||||
FROM fedora:33
 | 
					FROM fedora:37
 | 
				
			||||||
 | 
					
 | 
				
			||||||
RUN dnf install -y fedora-packager fedora-review
 | 
					RUN dnf install -y fedora-packager fedora-review
 | 
				
			||||||
RUN dnf install -y tree vim less
 | 
					RUN dnf install -y tree vim less
 | 
				
			||||||
RUN dnf install -y redhat-lsb-core
 | 
					RUN dnf install -y redhat-lsb-core
 | 
				
			||||||
RUN dnf install -y dnf-plugins-core
 | 
					RUN dnf install -y dnf-plugins-core
 | 
				
			||||||
 | 
					
 | 
				
			||||||
COPY centos/*.spec /tmp
 | 
					COPY fedora/*.spec /tmp
 | 
				
			||||||
RUN dnf builddep -y /tmp/*.spec
 | 
					RUN dnf builddep -y /tmp/*.spec
 | 
				
			||||||
 | 
					
 | 
				
			||||||
RUN useradd -m docker && echo "docker:docker" | chpasswd
 | 
					RUN useradd -m docker && echo "docker:docker" | chpasswd
 | 
				
			||||||
@ -1,36 +0,0 @@
 | 
				
			|||||||
FROM fedora:33
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
ENV KASMVNC_BUILD_OS fedora
 | 
					 | 
				
			||||||
ENV KASMVNC_BUILD_OS_CODENAME thirtythree
 | 
					 | 
				
			||||||
ENV XORG_VER 1.20.10
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# RUN dnf install -y build-dep xorg-server libxfont-dev sudo
 | 
					 | 
				
			||||||
RUN dnf install -y gcc cmake git gnutls-devel vim wget
 | 
					 | 
				
			||||||
#tightvncserver
 | 
					 | 
				
			||||||
RUN dnf install -y libpng-devel libtiff-devel giflib-devel openssl-devel
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#libavcodec-dev
 | 
					 | 
				
			||||||
RUN dnf -y install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
 | 
					 | 
				
			||||||
RUN dnf -y install https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
 | 
					 | 
				
			||||||
RUN dnf -y install ffmpeg-devel
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
RUN dnf install -y make
 | 
					 | 
				
			||||||
RUN dnf group install -y "Development Tools"
 | 
					 | 
				
			||||||
RUN dnf install -y xorg-x11-server-devel zlib-devel
 | 
					 | 
				
			||||||
RUN dnf install -y libxkbfile-devel libXfont2-devel xorg-x11-font-utils \
 | 
					 | 
				
			||||||
  xorg-x11-xtrans-devel xorg-x11-xkb-utils-devel libXrandr-devel libXtst-devel \
 | 
					 | 
				
			||||||
  libXcursor-devel
 | 
					 | 
				
			||||||
RUN dnf install -y mesa-dri-drivers
 | 
					 | 
				
			||||||
RUN dnf install -y bzip2 redhat-lsb-core
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
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"]
 | 
					 | 
				
			||||||
@ -0,0 +1,23 @@
 | 
				
			|||||||
 | 
					FROM oraclelinux:9
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					ENV STARTUPDIR=/dockerstartup
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					RUN dnf install -y \
 | 
				
			||||||
 | 
					  less \
 | 
				
			||||||
 | 
					  redhat-lsb-core \
 | 
				
			||||||
 | 
					  vim \
 | 
				
			||||||
 | 
					  xterm
 | 
				
			||||||
 | 
					RUN dnf config-manager --set-enabled ol9_codeready_builder
 | 
				
			||||||
 | 
					RUN dnf install -y oracle-epel-release-el9
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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"
 | 
				
			||||||
@ -0,0 +1,64 @@
 | 
				
			|||||||
 | 
					FROM oraclelinux:9
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					ENV KASMVNC_BUILD_OS oracle
 | 
				
			||||||
 | 
					ENV KASMVNC_BUILD_OS_CODENAME 9
 | 
				
			||||||
 | 
					ENV XORG_VER 1.20.10
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Install from stock repos
 | 
				
			||||||
 | 
					RUN \
 | 
				
			||||||
 | 
					  dnf config-manager --set-enabled ol9_codeready_builder && \
 | 
				
			||||||
 | 
					  dnf config-manager --set-enabled ol9_distro_builder && \
 | 
				
			||||||
 | 
					  dnf install -y \
 | 
				
			||||||
 | 
					    bzip2-devel \
 | 
				
			||||||
 | 
					    ca-certificates \
 | 
				
			||||||
 | 
					    cmake \
 | 
				
			||||||
 | 
					    dnf-plugins-core \
 | 
				
			||||||
 | 
					    gcc \
 | 
				
			||||||
 | 
					    gcc-c++ \
 | 
				
			||||||
 | 
					    git \
 | 
				
			||||||
 | 
					    gnutls-devel \
 | 
				
			||||||
 | 
					    libjpeg-turbo-devel \
 | 
				
			||||||
 | 
					    libpng-devel \
 | 
				
			||||||
 | 
					    libtiff-devel \
 | 
				
			||||||
 | 
					    libxshmfence-devel \
 | 
				
			||||||
 | 
					    make \
 | 
				
			||||||
 | 
					    mesa-dri-drivers \
 | 
				
			||||||
 | 
					    mesa-libGL-devel \
 | 
				
			||||||
 | 
					    mesa-libgbm-devel \
 | 
				
			||||||
 | 
					    openssl-devel \
 | 
				
			||||||
 | 
					    openssl-devel \
 | 
				
			||||||
 | 
					    patch \
 | 
				
			||||||
 | 
					    tigervnc-server \
 | 
				
			||||||
 | 
					    wget \
 | 
				
			||||||
 | 
					    xorg-x11-font-utils \
 | 
				
			||||||
 | 
					    zlib-devel
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Enable additional repos (epel, powertools, and fusion)
 | 
				
			||||||
 | 
					RUN dnf install -y oracle-epel-release-el9
 | 
				
			||||||
 | 
					RUN dnf install -y --nogpgcheck https://mirrors.rpmfusion.org/free/el/rpmfusion-free-release-9.noarch.rpm
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Install from new repos
 | 
				
			||||||
 | 
					RUN dnf install -y \
 | 
				
			||||||
 | 
					  giflib-devel \
 | 
				
			||||||
 | 
					  lbzip2 \
 | 
				
			||||||
 | 
					  libXfont2-devel \
 | 
				
			||||||
 | 
					  libxkbfile-devel \
 | 
				
			||||||
 | 
					  xorg-x11-server-devel \
 | 
				
			||||||
 | 
					  xorg-x11-xtrans-devel \
 | 
				
			||||||
 | 
					  libXrandr-devel \
 | 
				
			||||||
 | 
					  libXtst-devel \
 | 
				
			||||||
 | 
					  libXcursor-devel
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# 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
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					RUN useradd -m docker && echo "docker:docker" | chpasswd
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					COPY --chown=docker:docker . /src/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					USER docker
 | 
				
			||||||
 | 
					ENTRYPOINT ["/src/builder/build.sh"]
 | 
				
			||||||
@ -0,0 +1,23 @@
 | 
				
			|||||||
 | 
					FROM oraclelinux:9
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					ENV KASMVNC_BUILD_OS oracle
 | 
				
			||||||
 | 
					ENV KASMVNC_BUILD_OS_CODENAME 9
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					RUN dnf config-manager --set-enabled ol9_codeready_builder
 | 
				
			||||||
 | 
					RUN dnf config-manager --set-enabled ol9_distro_builder
 | 
				
			||||||
 | 
					RUN dnf install -y \
 | 
				
			||||||
 | 
					  gpg* \
 | 
				
			||||||
 | 
					  less \
 | 
				
			||||||
 | 
					  redhat-lsb-core \
 | 
				
			||||||
 | 
					  rng-tools \
 | 
				
			||||||
 | 
					  rpm* \
 | 
				
			||||||
 | 
					  rpmlint \
 | 
				
			||||||
 | 
					  rsync \
 | 
				
			||||||
 | 
					  tree \
 | 
				
			||||||
 | 
					  vim
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					COPY oracle/kasmvncserver9.spec /tmp
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					RUN useradd -m docker && echo "docker:docker" | chpasswd
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					USER docker
 | 
				
			||||||
@ -0,0 +1,124 @@
 | 
				
			|||||||
 | 
					Name:           kasmvncserver
 | 
				
			||||||
 | 
					Version:        1.0.0
 | 
				
			||||||
 | 
					Release:        1%{?dist}
 | 
				
			||||||
 | 
					Summary:        VNC server accessible from a web browser
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					License: GPLv2+
 | 
				
			||||||
 | 
					URL: https://github.com/kasmtech/KasmVNC
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					BuildRequires: rsync
 | 
				
			||||||
 | 
					Requires: xorg-x11-xauth, xkeyboard-config, openssl, perl, perl-Switch, perl-YAML-Tiny, perl-Hash-Merge-Simple, perl-Scalar-List-Utils, perl-List-MoreUtils, perl-Try-Tiny, mesa-libgbm, libxshmfence
 | 
				
			||||||
 | 
					Conflicts: tigervnc-server, tigervnc-server-minimal
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					%description
 | 
				
			||||||
 | 
					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. KasmVNC is maintained by Kasm 
 | 
				
			||||||
 | 
					Technologies Corp, www.kasmweb.com.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					WARNING: this package requires EPEL.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					%prep
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					%install
 | 
				
			||||||
 | 
					rm -rf $RPM_BUILD_ROOT
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					TARGET_OS=$(lsb_release -is | tr '[:upper:]' '[:lower:]')
 | 
				
			||||||
 | 
					TARGET_OS_CODENAME=$(lsb_release -cs | tr '[:upper:]' '[:lower:]')
 | 
				
			||||||
 | 
					TARBALL=$RPM_SOURCE_DIR/kasmvnc.${TARGET_OS}_${TARGET_OS_CODENAME}.tar.gz
 | 
				
			||||||
 | 
					TAR_DATA=$(mktemp -d)
 | 
				
			||||||
 | 
					tar -xzf "$TARBALL" -C "$TAR_DATA"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					SRC=$TAR_DATA/usr/local
 | 
				
			||||||
 | 
					SRC_BIN=$SRC/bin
 | 
				
			||||||
 | 
					DESTDIR=$RPM_BUILD_ROOT
 | 
				
			||||||
 | 
					DST_MAN=$DESTDIR/usr/share/man/man1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					mkdir -p $DESTDIR/usr/bin $DESTDIR/usr/share/man/man1 \
 | 
				
			||||||
 | 
					  $DESTDIR/usr/share/doc/kasmvncserver $DESTDIR/usr/lib \
 | 
				
			||||||
 | 
					  $DESTDIR/usr/share/perl5 $DESTDIR/etc/kasmvnc
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					cp $SRC_BIN/Xvnc $DESTDIR/usr/bin;
 | 
				
			||||||
 | 
					cp $SRC_BIN/vncserver $DESTDIR/usr/bin;
 | 
				
			||||||
 | 
					cp -a $SRC_BIN/KasmVNC $DESTDIR/usr/share/perl5/
 | 
				
			||||||
 | 
					cp $SRC_BIN/vncconfig $DESTDIR/usr/bin;
 | 
				
			||||||
 | 
					cp $SRC_BIN/kasmvncpasswd $DESTDIR/usr/bin;
 | 
				
			||||||
 | 
					cp $SRC_BIN/kasmxproxy $DESTDIR/usr/bin;
 | 
				
			||||||
 | 
					cp -r $SRC/lib/kasmvnc/ $DESTDIR/usr/lib/kasmvncserver
 | 
				
			||||||
 | 
					cd $DESTDIR/usr/bin && ln -s kasmvncpasswd vncpasswd;
 | 
				
			||||||
 | 
					cp -r $SRC/share/doc/kasmvnc*/* $DESTDIR/usr/share/doc/kasmvncserver/
 | 
				
			||||||
 | 
					rsync -r --exclude '.git*' --exclude po2js --exclude xgettext-html \
 | 
				
			||||||
 | 
					  --exclude www/utils/ --exclude .eslintrc --exclude configure \
 | 
				
			||||||
 | 
					  $SRC/share/kasmvnc $DESTDIR/usr/share
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					sed -i -e 's!pem_certificate: .\+$!pem_certificate: /etc/pki/tls/private/kasmvnc.pem!' \
 | 
				
			||||||
 | 
					    $DESTDIR/usr/share/kasmvnc/kasmvnc_defaults.yaml
 | 
				
			||||||
 | 
					sed -i -e 's!pem_key: .\+$!pem_key: /etc/pki/tls/private/kasmvnc.pem!' \
 | 
				
			||||||
 | 
					    $DESTDIR/usr/share/kasmvnc/kasmvnc_defaults.yaml
 | 
				
			||||||
 | 
					sed -e 's/^\([^#]\)/# \1/' $DESTDIR/usr/share/kasmvnc/kasmvnc_defaults.yaml > \
 | 
				
			||||||
 | 
					  $DESTDIR/etc/kasmvnc/kasmvnc.yaml
 | 
				
			||||||
 | 
					cp $SRC/man/man1/Xvnc.1 $DESTDIR/usr/share/man/man1/;
 | 
				
			||||||
 | 
					cp $SRC/share/man/man1/vncserver.1 $DST_MAN;
 | 
				
			||||||
 | 
					cp $SRC/share/man/man1/vncconfig.1 $DST_MAN;
 | 
				
			||||||
 | 
					cp $SRC/share/man/man1/vncpasswd.1 $DST_MAN;
 | 
				
			||||||
 | 
					cp $SRC/share/man/man1/kasmxproxy.1 $DST_MAN;
 | 
				
			||||||
 | 
					cd $DST_MAN && ln -s vncpasswd.1 kasmvncpasswd.1;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					%files
 | 
				
			||||||
 | 
					%config(noreplace) /etc/kasmvnc
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/usr/bin/*
 | 
				
			||||||
 | 
					/usr/lib/kasmvncserver
 | 
				
			||||||
 | 
					/usr/share/man/man1/*
 | 
				
			||||||
 | 
					/usr/share/perl5/KasmVNC
 | 
				
			||||||
 | 
					/usr/share/kasmvnc
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					%license /usr/share/doc/kasmvncserver/LICENSE.TXT
 | 
				
			||||||
 | 
					%doc /usr/share/doc/kasmvncserver/README.md
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					%changelog
 | 
				
			||||||
 | 
					* Tue Nov 29 2022 KasmTech <info@kasmweb.com> - 1.0.0-1
 | 
				
			||||||
 | 
					- WebRTC UDP transit support with support of STUN servers
 | 
				
			||||||
 | 
					- Lossless compression using multi-threaded WASM QOI decoder client side
 | 
				
			||||||
 | 
					- New yaml based configuration
 | 
				
			||||||
 | 
					- Significantly improved FPS through both client-side and server-side improvements.
 | 
				
			||||||
 | 
					- Support for the admin to define arbitrary http response headers for the built in web server
 | 
				
			||||||
 | 
					- Support for additional mouse buttons
 | 
				
			||||||
 | 
					- Refinement of vncserver checks and user prompts
 | 
				
			||||||
 | 
					- Added send_full_frame to developer API, forces full frame to be sent to all connected users that have at least read permission.
 | 
				
			||||||
 | 
					* Tue Mar 22 2022 KasmTech <info@kasmweb.com> - 0.9.3~beta-1
 | 
				
			||||||
 | 
					* Fri Feb 12 2021 KasmTech <info@kasmweb.com> - 0.9.1~beta-1
 | 
				
			||||||
 | 
					- Initial release of the rpm package.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					%post
 | 
				
			||||||
 | 
					  kasmvnc_group="kasmvnc-cert"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  create_kasmvnc_group() {
 | 
				
			||||||
 | 
					    if ! getent group "$kasmvnc_group" >/dev/null; then
 | 
				
			||||||
 | 
						    groupadd --system "$kasmvnc_group"
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  make_self_signed_certificate() {
 | 
				
			||||||
 | 
					    local cert_file=/etc/pki/tls/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
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					%postun
 | 
				
			||||||
 | 
					  rm -f /etc/pki/tls/private/kasmvnc.pem
 | 
				
			||||||
@ -1 +1 @@
 | 
				
			|||||||
Subproject commit f223cfcafee67c0544c7f7d887c787422299c285
 | 
					Subproject commit 31b1a93335c1cb4947d4eac06dd1311bb18f5022
 | 
				
			||||||
@ -0,0 +1,123 @@
 | 
				
			|||||||
 | 
					Name:           kasmvncserver
 | 
				
			||||||
 | 
					Version:        1.0.0
 | 
				
			||||||
 | 
					Release:        1%{?dist}
 | 
				
			||||||
 | 
					Summary:        VNC server accessible from a web browser
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					License: GPLv2+
 | 
				
			||||||
 | 
					URL: https://github.com/kasmtech/KasmVNC
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					BuildRequires: rsync
 | 
				
			||||||
 | 
					Requires: xorg-x11-xauth, xkeyboard-config, xorg-x11-server-utils, openssl, perl, perl-Switch, perl-YAML-Tiny, perl-Hash-Merge-Simple, perl-Scalar-List-Utils, perl-List-MoreUtils, perl-Try-Tiny, hostname, mesa-libgbm, libxshmfence
 | 
				
			||||||
 | 
					Conflicts: tigervnc-server, tigervnc-server-minimal
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					%description
 | 
				
			||||||
 | 
					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. KasmVNC is maintained by Kasm 
 | 
				
			||||||
 | 
					Technologies Corp, www.kasmweb.com.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					WARNING: this package requires EPEL and CodeReady builder.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					%prep
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					%install
 | 
				
			||||||
 | 
					rm -rf $RPM_BUILD_ROOT
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					TARGET_OS=$KASMVNC_BUILD_OS
 | 
				
			||||||
 | 
					TARGET_OS_CODENAME=$KASMVNC_BUILD_OS_CODENAME
 | 
				
			||||||
 | 
					TARBALL=$RPM_SOURCE_DIR/kasmvnc.${TARGET_OS}_${TARGET_OS_CODENAME}.tar.gz
 | 
				
			||||||
 | 
					TAR_DATA=$(mktemp -d)
 | 
				
			||||||
 | 
					tar -xzf "$TARBALL" -C "$TAR_DATA"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					SRC=$TAR_DATA/usr/local
 | 
				
			||||||
 | 
					SRC_BIN=$SRC/bin
 | 
				
			||||||
 | 
					DESTDIR=$RPM_BUILD_ROOT
 | 
				
			||||||
 | 
					DST_MAN=$DESTDIR/usr/share/man/man1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					mkdir -p $DESTDIR/usr/bin $DESTDIR/usr/share/man/man1 \
 | 
				
			||||||
 | 
					  $DESTDIR/usr/share/doc/kasmvncserver $DESTDIR/usr/lib \
 | 
				
			||||||
 | 
					  $DESTDIR/usr/share/perl5 $DESTDIR/etc/kasmvnc
 | 
				
			||||||
 | 
					cp $SRC_BIN/Xvnc $DESTDIR/usr/bin;
 | 
				
			||||||
 | 
					cp $SRC_BIN/vncserver $DESTDIR/usr/bin;
 | 
				
			||||||
 | 
					cp -a $SRC_BIN/KasmVNC $DESTDIR/usr/share/perl5
 | 
				
			||||||
 | 
					cp $SRC_BIN/vncconfig $DESTDIR/usr/bin;
 | 
				
			||||||
 | 
					cp $SRC_BIN/kasmvncpasswd $DESTDIR/usr/bin;
 | 
				
			||||||
 | 
					cp $SRC_BIN/kasmxproxy $DESTDIR/usr/bin;
 | 
				
			||||||
 | 
					cp -r $SRC/lib/kasmvnc/ $DESTDIR/usr/lib/kasmvncserver
 | 
				
			||||||
 | 
					cd $DESTDIR/usr/bin && ln -s kasmvncpasswd vncpasswd;
 | 
				
			||||||
 | 
					cp -r $SRC/share/doc/kasmvnc*/* $DESTDIR/usr/share/doc/kasmvncserver/
 | 
				
			||||||
 | 
					rsync -r --exclude '.git*' --exclude po2js --exclude xgettext-html \
 | 
				
			||||||
 | 
					  --exclude www/utils/ --exclude .eslintrc --exclude configure \
 | 
				
			||||||
 | 
					  $SRC/share/kasmvnc $DESTDIR/usr/share
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					sed -i -e 's!pem_certificate: .\+$!pem_certificate: /etc/pki/tls/private/kasmvnc.pem!' \
 | 
				
			||||||
 | 
					    $DESTDIR/usr/share/kasmvnc/kasmvnc_defaults.yaml
 | 
				
			||||||
 | 
					sed -i -e 's!pem_key: .\+$!pem_key: /etc/pki/tls/private/kasmvnc.pem!' \
 | 
				
			||||||
 | 
					    $DESTDIR/usr/share/kasmvnc/kasmvnc_defaults.yaml
 | 
				
			||||||
 | 
					sed -e 's/^\([^#]\)/# \1/' $DESTDIR/usr/share/kasmvnc/kasmvnc_defaults.yaml > \
 | 
				
			||||||
 | 
					  $DESTDIR/etc/kasmvnc/kasmvnc.yaml
 | 
				
			||||||
 | 
					cp $SRC/man/man1/Xvnc.1 $DESTDIR/usr/share/man/man1/;
 | 
				
			||||||
 | 
					cp $SRC/share/man/man1/vncserver.1 $DST_MAN;
 | 
				
			||||||
 | 
					cp $SRC/share/man/man1/vncconfig.1 $DST_MAN;
 | 
				
			||||||
 | 
					cp $SRC/share/man/man1/vncpasswd.1 $DST_MAN;
 | 
				
			||||||
 | 
					cp $SRC/share/man/man1/kasmxproxy.1 $DST_MAN;
 | 
				
			||||||
 | 
					cd $DST_MAN && ln -s vncpasswd.1 kasmvncpasswd.1;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					%files
 | 
				
			||||||
 | 
					%config(noreplace) /etc/kasmvnc
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/usr/bin/*
 | 
				
			||||||
 | 
					/usr/lib/kasmvncserver
 | 
				
			||||||
 | 
					/usr/share/man/man1/*
 | 
				
			||||||
 | 
					/usr/share/perl5/KasmVNC
 | 
				
			||||||
 | 
					/usr/share/kasmvnc
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					%license /usr/share/doc/kasmvncserver/LICENSE.TXT
 | 
				
			||||||
 | 
					%doc /usr/share/doc/kasmvncserver/README.md
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					%changelog
 | 
				
			||||||
 | 
					* Tue Nov 29 2022 KasmTech <info@kasmweb.com> - 1.0.0-1
 | 
				
			||||||
 | 
					- WebRTC UDP transit support with support of STUN servers
 | 
				
			||||||
 | 
					- Lossless compression using multi-threaded WASM QOI decoder client side
 | 
				
			||||||
 | 
					- New yaml based configuration
 | 
				
			||||||
 | 
					- Significantly improved FPS through both client-side and server-side improvements.
 | 
				
			||||||
 | 
					- Support for the admin to define arbitrary http response headers for the built in web server
 | 
				
			||||||
 | 
					- Support for additional mouse buttons
 | 
				
			||||||
 | 
					- Refinement of vncserver checks and user prompts
 | 
				
			||||||
 | 
					- Added send_full_frame to developer API, forces full frame to be sent to all connected users that have at least read permission.
 | 
				
			||||||
 | 
					* Tue Mar 22 2022 KasmTech <info@kasmweb.com> - 0.9.3~beta-1
 | 
				
			||||||
 | 
					* Fri Feb 12 2021 KasmTech <info@kasmweb.com> - 0.9.1~beta-1
 | 
				
			||||||
 | 
					- Initial release of the rpm package.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					%post
 | 
				
			||||||
 | 
					  kasmvnc_group="kasmvnc-cert"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  create_kasmvnc_group() {
 | 
				
			||||||
 | 
					    if ! getent group "$kasmvnc_group" >/dev/null; then
 | 
				
			||||||
 | 
						    groupadd --system "$kasmvnc_group"
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  make_self_signed_certificate() {
 | 
				
			||||||
 | 
					    local cert_file=/etc/pki/tls/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
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					%postun
 | 
				
			||||||
 | 
					  rm -f /etc/pki/tls/private/kasmvnc.pem
 | 
				
			||||||
@ -0,0 +1,4 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					!/hw
 | 
				
			||||||
 | 
					/hw/*
 | 
				
			||||||
 | 
					!/hw/vnc
 | 
				
			||||||
@ -0,0 +1,284 @@
 | 
				
			|||||||
 | 
					/* Copyright (c) 2023 Kasm
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Permission is hereby granted, free of charge, to any person obtaining
 | 
				
			||||||
 | 
					a copy of this software and associated documentation files (the
 | 
				
			||||||
 | 
					"Software"), to deal in the Software without restriction, including
 | 
				
			||||||
 | 
					without limitation the rights to use, copy, modify, merge, publish,
 | 
				
			||||||
 | 
					distribute, sublicense, and/or sell copies of the Software, and to
 | 
				
			||||||
 | 
					permit persons to whom the Software is furnished to do so, subject to
 | 
				
			||||||
 | 
					the following conditions:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					The above copyright notice and this permission notice shall be included
 | 
				
			||||||
 | 
					in all copies or substantial portions of the Software.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 | 
				
			||||||
 | 
					OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 | 
				
			||||||
 | 
					MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 | 
				
			||||||
 | 
					IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
 | 
				
			||||||
 | 
					OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
 | 
				
			||||||
 | 
					ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 | 
				
			||||||
 | 
					OTHER DEALINGS IN THE SOFTWARE.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Except as contained in this notice, the name of the X Consortium shall
 | 
				
			||||||
 | 
					not be used in advertising or otherwise to promote the sale, use or
 | 
				
			||||||
 | 
					other dealings in this Software without prior written authorization
 | 
				
			||||||
 | 
					from the X Consortium.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifdef HAVE_DIX_CONFIG_H
 | 
				
			||||||
 | 
					#include <dix-config.h>
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifdef DRI3
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include <errno.h>
 | 
				
			||||||
 | 
					#include <fcntl.h>
 | 
				
			||||||
 | 
					#include <stdio.h>
 | 
				
			||||||
 | 
					#include <stdint.h>
 | 
				
			||||||
 | 
					#include <string.h>
 | 
				
			||||||
 | 
					#include <sys/types.h>
 | 
				
			||||||
 | 
					#include <sys/stat.h>
 | 
				
			||||||
 | 
					#include <sys/time.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include <X11/X.h>
 | 
				
			||||||
 | 
					#include <X11/Xmd.h>
 | 
				
			||||||
 | 
					#include <dri3.h>
 | 
				
			||||||
 | 
					#include <drm_fourcc.h>
 | 
				
			||||||
 | 
					#include <fb.h>
 | 
				
			||||||
 | 
					#include <gcstruct.h>
 | 
				
			||||||
 | 
					#include <gbm.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					extern const char *driNode;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static struct priv_t {
 | 
				
			||||||
 | 
					    struct gbm_device *gbm;
 | 
				
			||||||
 | 
					    int fd;
 | 
				
			||||||
 | 
					} priv;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					struct gbm_pixmap {
 | 
				
			||||||
 | 
					    struct gbm_bo *bo;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					typedef struct gbm_pixmap gbm_pixmap;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static DevPrivateKeyRec dri3_pixmap_private_key;
 | 
				
			||||||
 | 
					static struct timeval start;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static int
 | 
				
			||||||
 | 
					xvnc_dri3_open_client(ClientPtr client,
 | 
				
			||||||
 | 
					                     ScreenPtr screen,
 | 
				
			||||||
 | 
					                     RRProviderPtr provider,
 | 
				
			||||||
 | 
					                     int *pfd)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    int fd = open(driNode, O_RDWR | O_CLOEXEC);
 | 
				
			||||||
 | 
					    if (fd < 0)
 | 
				
			||||||
 | 
					        return BadAlloc;
 | 
				
			||||||
 | 
					    *pfd = fd;
 | 
				
			||||||
 | 
					    return Success;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static uint32_t
 | 
				
			||||||
 | 
					gbm_format_for_depth(CARD8 depth)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    switch (depth) {
 | 
				
			||||||
 | 
					    case 16:
 | 
				
			||||||
 | 
					        return GBM_FORMAT_RGB565;
 | 
				
			||||||
 | 
					    case 24:
 | 
				
			||||||
 | 
					        return GBM_FORMAT_XRGB8888;
 | 
				
			||||||
 | 
					    case 30:
 | 
				
			||||||
 | 
					        return GBM_FORMAT_ARGB2101010;
 | 
				
			||||||
 | 
					    default:
 | 
				
			||||||
 | 
					        ErrorF("unexpected depth: %d\n", depth);
 | 
				
			||||||
 | 
					        /* fallthrough */
 | 
				
			||||||
 | 
					    case 32:
 | 
				
			||||||
 | 
					        return GBM_FORMAT_ARGB8888;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static void dri3_pixmap_set_private(PixmapPtr pixmap, gbm_pixmap *gp)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    dixSetPrivate(&pixmap->devPrivates, &dri3_pixmap_private_key, gp);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static gbm_pixmap *gbm_pixmap_get(PixmapPtr pixmap)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    return dixLookupPrivate(&pixmap->devPrivates, &dri3_pixmap_private_key);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static PixmapPtr
 | 
				
			||||||
 | 
					create_pixmap_for_bo(ScreenPtr screen, struct gbm_bo *bo, CARD8 depth)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    PixmapPtr pixmap;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    gbm_pixmap *gp = calloc(1, sizeof(gbm_pixmap));
 | 
				
			||||||
 | 
					    if (!gp)
 | 
				
			||||||
 | 
					        return NULL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    pixmap = screen->CreatePixmap(screen, gbm_bo_get_width(bo), gbm_bo_get_height(bo),
 | 
				
			||||||
 | 
					                                  depth, CREATE_PIXMAP_USAGE_SCRATCH);
 | 
				
			||||||
 | 
					    if (!pixmap)
 | 
				
			||||||
 | 
					        return NULL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    gp->bo = bo;
 | 
				
			||||||
 | 
					    dri3_pixmap_set_private(pixmap, gp);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    return pixmap;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static PixmapPtr
 | 
				
			||||||
 | 
					xvnc_pixmap_from_fds(ScreenPtr screen, CARD8 num_fds, const int *fds,
 | 
				
			||||||
 | 
					                       CARD16 width, CARD16 height,
 | 
				
			||||||
 | 
					                       const CARD32 *strides, const CARD32 *offsets,
 | 
				
			||||||
 | 
					                       CARD8 depth, CARD8 bpp, uint64_t modifier)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    struct gbm_bo *bo = NULL;
 | 
				
			||||||
 | 
					    PixmapPtr pixmap;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if (width == 0 || height == 0 || num_fds == 0 ||
 | 
				
			||||||
 | 
					        depth < 15 || bpp != BitsPerPixel(depth) ||
 | 
				
			||||||
 | 
					        strides[0] < width * bpp / 8)
 | 
				
			||||||
 | 
					        return NULL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if (num_fds == 1) {
 | 
				
			||||||
 | 
					        struct gbm_import_fd_data data;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        data.fd = fds[0];
 | 
				
			||||||
 | 
					        data.width = width;
 | 
				
			||||||
 | 
					        data.height = height;
 | 
				
			||||||
 | 
					        data.stride = strides[0];
 | 
				
			||||||
 | 
					        data.format = gbm_format_for_depth(depth);
 | 
				
			||||||
 | 
					        bo = gbm_bo_import(priv.gbm, GBM_BO_IMPORT_FD, &data,
 | 
				
			||||||
 | 
					                           GBM_BO_USE_RENDERING);
 | 
				
			||||||
 | 
					        if (!bo)
 | 
				
			||||||
 | 
					            return NULL;
 | 
				
			||||||
 | 
					    } else {
 | 
				
			||||||
 | 
					        return NULL;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    pixmap = create_pixmap_for_bo(screen, bo, depth);
 | 
				
			||||||
 | 
					    if (pixmap == NULL) {
 | 
				
			||||||
 | 
					        gbm_bo_destroy(bo);
 | 
				
			||||||
 | 
					        return NULL;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    return pixmap;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static int
 | 
				
			||||||
 | 
					xvnc_fds_from_pixmap(ScreenPtr screen, PixmapPtr pixmap, int *fds,
 | 
				
			||||||
 | 
					                     uint32_t *strides, uint32_t *offsets,
 | 
				
			||||||
 | 
					                     uint64_t *modifier)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    gbm_pixmap *gp = gbm_pixmap_get(pixmap);
 | 
				
			||||||
 | 
					    if (!gp)
 | 
				
			||||||
 | 
					        return 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    fds[0] = gbm_bo_get_fd(gp->bo);
 | 
				
			||||||
 | 
					    strides[0] = gbm_bo_get_stride(gp->bo);
 | 
				
			||||||
 | 
					    offsets[0] = 0;
 | 
				
			||||||
 | 
					    *modifier = DRM_FORMAT_MOD_INVALID;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    return 1;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static Bool
 | 
				
			||||||
 | 
					xvnc_get_formats(ScreenPtr screen,
 | 
				
			||||||
 | 
					                 CARD32 *num_formats, CARD32 **formats)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    ErrorF("xvnc_get_formats\n");
 | 
				
			||||||
 | 
					    return FALSE;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static Bool
 | 
				
			||||||
 | 
					xvnc_get_modifiers(ScreenPtr screen, uint32_t format,
 | 
				
			||||||
 | 
					                   uint32_t *num_modifiers, uint64_t **modifiers)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    ErrorF("xvnc_get_modifiers\n");
 | 
				
			||||||
 | 
					    return FALSE;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static Bool
 | 
				
			||||||
 | 
					xvnc_get_drawable_modifiers(DrawablePtr draw, uint32_t format,
 | 
				
			||||||
 | 
					                            uint32_t *num_modifiers, uint64_t **modifiers)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    ErrorF("xvnc_get_drawable_modifiers\n");
 | 
				
			||||||
 | 
					    return FALSE;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static const dri3_screen_info_rec xvnc_dri3_info = {
 | 
				
			||||||
 | 
					    .version = 2,
 | 
				
			||||||
 | 
					    .open = NULL,
 | 
				
			||||||
 | 
					    .pixmap_from_fds = xvnc_pixmap_from_fds,
 | 
				
			||||||
 | 
					    .fds_from_pixmap = xvnc_fds_from_pixmap,
 | 
				
			||||||
 | 
					    .open_client = xvnc_dri3_open_client,
 | 
				
			||||||
 | 
					    .get_formats = xvnc_get_formats,
 | 
				
			||||||
 | 
					    .get_modifiers = xvnc_get_modifiers,
 | 
				
			||||||
 | 
					    .get_drawable_modifiers = xvnc_get_drawable_modifiers,
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void xvnc_sync_dri3_pixmap(PixmapPtr pixmap)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    // There doesn't seem to be a good hook or sync point, so we do it manually
 | 
				
			||||||
 | 
					    // here, right before Present copies from the pixmap
 | 
				
			||||||
 | 
					    DrawablePtr pDraw;
 | 
				
			||||||
 | 
					    GCPtr gc;
 | 
				
			||||||
 | 
					    void *ptr;
 | 
				
			||||||
 | 
					    uint32_t stride, w, h;
 | 
				
			||||||
 | 
					    void *opaque = NULL;
 | 
				
			||||||
 | 
					    gbm_pixmap *gp = gbm_pixmap_get(pixmap);
 | 
				
			||||||
 | 
					    if (!gp) {
 | 
				
			||||||
 | 
					        ErrorF("Present tried to copy from a non-dri3 pixmap\n");
 | 
				
			||||||
 | 
					        return;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    w = gbm_bo_get_width(gp->bo);
 | 
				
			||||||
 | 
					    h = gbm_bo_get_height(gp->bo);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    ptr = gbm_bo_map(gp->bo, 0, 0, w, h,
 | 
				
			||||||
 | 
					                     GBM_BO_TRANSFER_READ, &stride, &opaque);
 | 
				
			||||||
 | 
					    if (!ptr) {
 | 
				
			||||||
 | 
					        ErrorF("gbm map failed, errno %d\n", errno);
 | 
				
			||||||
 | 
					        return;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    pDraw = &pixmap->drawable;
 | 
				
			||||||
 | 
					    if ((gc = GetScratchGC(pDraw->depth, pDraw->pScreen))) {
 | 
				
			||||||
 | 
					        ValidateGC(pDraw, gc);
 | 
				
			||||||
 | 
					        //gc->ops->PutImage(pDraw, gc, pDraw->depth, 0, 0, w, h, 0, ZPixmap, data);
 | 
				
			||||||
 | 
					        fbPutZImage(pDraw, fbGetCompositeClip(gc), gc->alu, fbGetGCPrivate(gc)->pm,
 | 
				
			||||||
 | 
					                    0, 0, w, h, ptr, stride / sizeof(FbStip));
 | 
				
			||||||
 | 
					        FreeScratchGC(gc);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    gbm_bo_unmap(gp->bo, opaque);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void xvnc_init_dri3(void)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    memset(&priv, 0, sizeof(priv));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    gettimeofday(&start, NULL);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if (!dixRegisterPrivateKey(&dri3_pixmap_private_key, PRIVATE_PIXMAP, 0))
 | 
				
			||||||
 | 
					        FatalError("dix\n");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if (!driNode)
 | 
				
			||||||
 | 
					        driNode = "/dev/dri/renderD128";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    priv.fd = open(driNode, O_RDWR | O_CLOEXEC);
 | 
				
			||||||
 | 
					    if (!priv.fd)
 | 
				
			||||||
 | 
					        FatalError("Failed to open %s\n", driNode);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    priv.gbm = gbm_create_device(priv.fd);
 | 
				
			||||||
 | 
					    if (!priv.gbm)
 | 
				
			||||||
 | 
					        FatalError("Failed to create gbm\n");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if (!dri3_screen_init(screenInfo.screens[0], &xvnc_dri3_info))
 | 
				
			||||||
 | 
					        FatalError("Couldn't init dri3\n");
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#endif // DRI3
 | 
				
			||||||
					Loading…
					
					
				
		Reference in New Issue