From 553e5ed9b5be3397d571e478dff630681ad07ff6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joel=20Wir=C4=81mu=20Pauling?= Date: Sun, 29 Mar 2026 13:17:56 +1300 Subject: [PATCH 1/3] jansson: add JSON C library package (v2.15.0) Required dependency for wayvnc VNC server (IPC/config parsing). Lightweight (~30KB .so), zero external dependencies. Build: cmake with shared library, docs/tests disabled. --- packages/devel/jansson/package.mk | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 packages/devel/jansson/package.mk diff --git a/packages/devel/jansson/package.mk b/packages/devel/jansson/package.mk new file mode 100644 index 00000000000..0b3530bc176 --- /dev/null +++ b/packages/devel/jansson/package.mk @@ -0,0 +1,17 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (C) 2025-present ROCKNIX (https://github.com/ROCKNIX) + +PKG_NAME="jansson" +PKG_VERSION="2.15.0" +PKG_SHA256="a7eac7765000373165f9373eb748be039c10b2efc00be9af3467ec92357d8954" +PKG_LICENSE="MIT" +PKG_SITE="https://github.com/akheron/jansson" +PKG_URL="https://github.com/akheron/jansson/releases/download/v${PKG_VERSION}/jansson-${PKG_VERSION}.tar.bz2" +PKG_DEPENDS_TARGET="toolchain" +PKG_LONGDESC="Jansson is a C library for encoding, decoding and manipulating JSON data" +PKG_TOOLCHAIN="cmake" + +PKG_CMAKE_OPTS_TARGET="-DJANSSON_BUILD_DOCS=OFF \ + -DJANSSON_BUILD_SHARED_LIBS=ON \ + -DJANSSON_EXAMPLES=OFF \ + -DJANSSON_WITHOUT_TESTS=ON" From b2a655ca176730c9c7abb7807c3efb041da1bbea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joel=20Wir=C4=81mu=20Pauling?= Date: Sun, 29 Mar 2026 13:18:12 +1300 Subject: [PATCH 2/3] wayvnc: add VNC server for sway (wayvnc + neatvnc + aml) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit VNC server for wlroots-based Wayland compositors. Attaches to the running sway session via screencopy and provides remote desktop access on port 5900 — any VNC client connects without authentication. Build architecture: - wayvnc (master/0.10-dev) as main package - neatvnc + aml built as meson subprojects (tightly version-coupled) - All dependencies already available in ROCKNIX except jansson (added) Compiled features: - H.264 encoding via V4L2 M2M (hardware encoder on ARM SoCs: rkvenc, venus) and FFmpeg libavcodec fallback - JPEG compression via libjpeg-turbo (Tight encoding) - TLS support via gnutls (compiled in, not active by default) - WebSocket support via nettle (for browser-based VNC clients) - Screencopy DMA-BUF (zero-copy frame capture) - Cursor rendering into VNC stream (--render-cursor) Service integration: - systemd unit: wayvnc.service with ConditionPathExists sentinel - Daemon script: 003-wayvnc (setting key: vnc.enabled) - Follows exact SSH/Samba pattern for ES toggle integration - Listens on 0.0.0.0:5900, no auth, no config file needed Added to network virtual package for all devices (~310KB total). Binary size: wayvnc ~200KB, wayvncctl ~80KB, libneatvnc ~120KB, libaml ~15KB. --- .../network/wayvnc/daemons/003-wayvnc | 4 ++ .../packages/network/wayvnc/package.mk | 65 +++++++++++++++++++ .../network/wayvnc/system.d/wayvnc.service | 17 +++++ .../packages/virtual/network/package.mk | 2 +- 4 files changed, 87 insertions(+), 1 deletion(-) create mode 100644 projects/ROCKNIX/packages/network/wayvnc/daemons/003-wayvnc create mode 100644 projects/ROCKNIX/packages/network/wayvnc/package.mk create mode 100644 projects/ROCKNIX/packages/network/wayvnc/system.d/wayvnc.service diff --git a/projects/ROCKNIX/packages/network/wayvnc/daemons/003-wayvnc b/projects/ROCKNIX/packages/network/wayvnc/daemons/003-wayvnc new file mode 100644 index 00000000000..be4b248b634 --- /dev/null +++ b/projects/ROCKNIX/packages/network/wayvnc/daemons/003-wayvnc @@ -0,0 +1,4 @@ +STATE=$(get_setting vnc.enabled) +SVC="wayvnc" +CONF="wayvnc.conf" +DAEMONS=("wayvnc") diff --git a/projects/ROCKNIX/packages/network/wayvnc/package.mk b/projects/ROCKNIX/packages/network/wayvnc/package.mk new file mode 100644 index 00000000000..1dd3c9dcf31 --- /dev/null +++ b/projects/ROCKNIX/packages/network/wayvnc/package.mk @@ -0,0 +1,65 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (C) 2025-present ROCKNIX (https://github.com/ROCKNIX) + +PKG_NAME="wayvnc" +PKG_VERSION="477ef59b1ea19f96d6a57ac3572f1fb33c117672" +PKG_SHA256="3ff0f3f7994712612f898b3896eb9ea3bf64a65cf39311876b072393931c3d20" +PKG_LICENSE="ISC" +PKG_SITE="https://github.com/any1/wayvnc" +PKG_URL="https://github.com/any1/wayvnc/archive/${PKG_VERSION}.tar.gz" +PKG_DEPENDS_TARGET="toolchain sway libdrm pixman libxkbcommon wayland wayland-protocols jansson gnutls libjpeg-turbo nettle gmp ffmpeg" +PKG_LONGDESC="wayvnc: VNC server for wlroots-based Wayland compositors" +PKG_TOOLCHAIN="meson" + +# neatvnc and aml are built as meson subprojects (tightly version-coupled) +_NEATVNC_VERSION="28d902a73f11d76d9fc6ad6117fd1e35961fad0a" +_AML_VERSION="ce4b82d5888a87110054b95414bd3068224d2b91" + +PKG_MESON_OPTS_TARGET="-Dpam=disabled \ + -Dman-pages=disabled \ + -Dtests=false \ + -Dscreencopy-dmabuf=auto \ + -Dneatvnc:jpeg=enabled \ + -Dneatvnc:tls=enabled \ + -Dneatvnc:h264=enabled \ + -Dneatvnc:nettle=enabled \ + -Dneatvnc:gbm=auto \ + -Dneatvnc:tests=false \ + -Dneatvnc:examples=false \ + -Dneatvnc:benchmarks=false" + +pre_configure_target() { + # Download neatvnc and aml as meson subprojects + mkdir -p ${PKG_BUILD}/subprojects + + # neatvnc + if [ ! -d "${PKG_BUILD}/subprojects/neatvnc" ]; then + wget -q -O ${PKG_BUILD}/subprojects/neatvnc.tar.gz \ + "https://github.com/any1/neatvnc/archive/${_NEATVNC_VERSION}.tar.gz" + tar xf ${PKG_BUILD}/subprojects/neatvnc.tar.gz -C ${PKG_BUILD}/subprojects + mv ${PKG_BUILD}/subprojects/neatvnc-${_NEATVNC_VERSION} \ + ${PKG_BUILD}/subprojects/neatvnc + rm ${PKG_BUILD}/subprojects/neatvnc.tar.gz + fi + + # aml + if [ ! -d "${PKG_BUILD}/subprojects/aml" ]; then + wget -q -O ${PKG_BUILD}/subprojects/aml.tar.gz \ + "https://github.com/any1/aml/archive/${_AML_VERSION}.tar.gz" + tar xf ${PKG_BUILD}/subprojects/aml.tar.gz -C ${PKG_BUILD}/subprojects + mv ${PKG_BUILD}/subprojects/aml-${_AML_VERSION} \ + ${PKG_BUILD}/subprojects/aml + rm ${PKG_BUILD}/subprojects/aml.tar.gz + fi +} + +post_makeinstall_target() { + # Remove man pages, headers, pkgconfig — only need the binaries + neatvnc .so + rm -rf ${INSTALL}/usr/share/man + rm -rf ${INSTALL}/usr/include + rm -rf ${INSTALL}/usr/lib/pkgconfig +} + +post_install() { + enable_service wayvnc.service +} diff --git a/projects/ROCKNIX/packages/network/wayvnc/system.d/wayvnc.service b/projects/ROCKNIX/packages/network/wayvnc/system.d/wayvnc.service new file mode 100644 index 00000000000..b1d156beecf --- /dev/null +++ b/projects/ROCKNIX/packages/network/wayvnc/system.d/wayvnc.service @@ -0,0 +1,17 @@ +[Unit] +Description=wayvnc VNC Server +After=sway.service +ConditionPathExists=|/storage/.cache/services/wayvnc.conf + +[Service] +Environment=WAYLAND_DISPLAY=wayland-1 +Environment=XDG_RUNTIME_DIR=/run/0-runtime-dir +Environment=SWAYSOCK=/run/0-runtime-dir/sway-ipc.0.sock +ExecStart=/usr/bin/wayvnc --render-cursor 0.0.0.0 +Restart=on-failure +RestartSec=2 +TimeoutStopSec=1s +StartLimitInterval=0 + +[Install] +WantedBy=multi-user.target diff --git a/projects/ROCKNIX/packages/virtual/network/package.mk b/projects/ROCKNIX/packages/virtual/network/package.mk index 94c73013e6e..85d3af91230 100644 --- a/projects/ROCKNIX/packages/virtual/network/package.mk +++ b/projects/ROCKNIX/packages/virtual/network/package.mk @@ -7,7 +7,7 @@ PKG_VERSION="" PKG_LICENSE="various" PKG_SITE="https://libreelec.tv" PKG_URL="" -PKG_DEPENDS_TARGET="toolchain connman iwd netbase ethtool openssh iw wireless-regdb rsync tailscale avahi miniupnpc nss-mdns speedtest-cli" +PKG_DEPENDS_TARGET="toolchain connman iwd netbase ethtool openssh iw wireless-regdb rsync tailscale avahi miniupnpc nss-mdns speedtest-cli wayvnc" PKG_SECTION="virtual" PKG_LONGDESC="Metapackage for various packages to install network support" From 02240c0ef48ce867722caea2076d71374852d4bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joel=20Wir=C4=81mu=20Pauling?= Date: Sun, 29 Mar 2026 14:45:08 +1300 Subject: [PATCH 3/3] jansson: move from upstream packages/ to projects/ROCKNIX/packages/ The upstream packages/ folder is protected by CI and must not be modified in PRs. Move jansson to the ROCKNIX project packages directory where all distribution-specific packages belong. --- {packages => projects/ROCKNIX/packages}/devel/jansson/package.mk | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {packages => projects/ROCKNIX/packages}/devel/jansson/package.mk (100%) diff --git a/packages/devel/jansson/package.mk b/projects/ROCKNIX/packages/devel/jansson/package.mk similarity index 100% rename from packages/devel/jansson/package.mk rename to projects/ROCKNIX/packages/devel/jansson/package.mk