192.5. waypipe-0.11.2
Network proxy for Wayland clients — run a program on another machine and show it here, over SSH
| Version | 0.11.2, release 1 |
| Shelf | wl — Wayland libraries and protocols, and Wayland-only desktop utilities |
| Phase | 42_graphics (Graphics Stack), 175 of 189 in build order |
| Licence | GPL-3.0-or-later AND MIT |
| Homepage | https://gitlab.freedesktop.org/mstoeckl/waypipe |
| Build time | 2.0 SBU |
| Installed size | 2.0 MiB in 4 files |
| Recipe | ports/core/wl/waypipe/kpkgbuild |
About
Waypipe is a proxy for Wayland clients: run as waypipe ssh host program, it starts the program on the other machine and forwards its Wayland protocol, buffers and file descriptors over the SSH connection, so the window appears on this desktop as a local one. It is the Wayland counterpart of X11 forwarding. The port builds the Rust implementation; the older C one, waypipe-c, is not built.
Sources
waypipe-0.11.2.tar.gz(572.2 KiB)
sha25670914b590b2b9a74a16fe9936bb7dba6b3eb59466ed17aaba2613c9fa09b8dad
upstream: https://gitlab.freedesktop.org/mstoeckl/waypipe/-/archive/v0.11.2/waypipe-v0.11.2.tar.gz
archive copy: sources-4/wl--waypipe-0.11.2.tar.gzwaypipe-vendor-0.11.2.tar.xz(5.4 MiB)
sha2560350ffa997edc6656c24edee54f669750a69276c486168db0ada94f218b1952d
a vendor bundle: the dependencies upstream’s own tool would download, packed once
archive copy: sources-4/wl--waypipe-vendor-0.11.2.tar.xz
Dependencies
Depends on: meson, ninja, pkgconf, scdoc, rust, bindgen, clang, lz4, zstd, ffmpeg, mesa, vulkan-headers, vulkan-loader, shaderc, openssh.
Required by: no port names it.
Installation
From the repository root, inside the build container, this is the line kdosbuild runs for the port:
script/chroot/exec.sh bash -c 'source script/phases/42_graphics/phase.env && kpkg install waypipe'
What kpkg does
kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/wl/waypipe.
1. Verify every declared source. Each file a sha256 = line names, found in the port directory or in /var/cache/kpkg/sources, must hash to its line; a mismatch stops the build before anything is unpacked.
cd /ports/core/wl/waypipe
echo '70914b590b2b9a74a16fe9936bb7dba6b3eb59466ed17aaba2613c9fa09b8dad waypipe-0.11.2.tar.gz' | sha256sum -c -
echo '0350ffa997edc6656c24edee54f669750a69276c486168db0ada94f218b1952d waypipe-vendor-0.11.2.tar.xz' | sha256sum -c -
2. Unpack. The work directory is emptied and the first source is unpacked into $SRC with its top directory stripped; any later tarball lands unstripped beside it in $SRC_ROOT, and a file that is not a tarball is copied into $SRC.
SRC_ROOT=/var/cache/kpkg/work/waypipe
SRC=$SRC_ROOT/waypipe-0.11.2
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf waypipe-0.11.2.tar.gz -C "$SRC" --strip-components=1
Every config.guess and config.sub older than automake’s is then replaced with automake’s, so a configure script recognises the musl target.
3. Build. build.sh is sourced in a subshell under set -e, from $SRC, with name, version, release and the five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:
tar xf $PORT_SRC/${name}-vendor-${version}.tar.xz
export CARGO_HOME="$SRC_ROOT/.cargo"
export CARGO_NET_OFFLINE=true
export RUSTFLAGS="-C target-feature=-crt-static"
export LIBCLANG_PATH=/usr/lib
meson setup build \
--prefix=/usr --libdir=lib \
--buildtype=release \
-Dwerror=false \
-Dbuild_rs=true \
-Dbuild_c=false \
-Dtests=false \
-Dman-pages=enabled \
-Dwith_video=enabled \
-Dwith_dmabuf=enabled \
-Dwith_lz4=enabled \
-Dwith_zstd=enabled \
-Dwith_gbm=enabled
meson compile -C build
DESTDIR=$PKG meson install --no-rebuild -C build
The switches, and why each is set:
--buildtype=release— Meson’sreleaseis optimisation level 3 with no debug information, and waypipe’smeson.buildmaps that onto the Cargo profilemeson-3-strip, which it passes tocargo build: opt-level 3, LTO, one codegen unit, debug information stripped.-Dwerror=false— Override thewerror=truethat upstream’smeson.buildsets in its default options, under which meson treats every compiler warning as an error. It reaches only C that meson compiles itself, which with-Dbuild_c=falseis none; Cargo’s build is a custom target that meson’s warning options do not touch.-Dbuild_rs=true,-Dbuild_c=false— Build the Rustwaypipeand notwaypipe-c. Meson only drivescargohere: it works out which Cargo features to ask for from the options below and passes them with--no-default-features --features.-Dtests=false— Onlywaypipe-c’smeson.buildreads this option. The Rust build declares its two tests,cargo testand a shortenedwaypipe benchrun, regardless; they run only undermeson test, which the build does not call.-Dman-pages=enabled— Generatewaypipe.1with scdoc, failing if it is missing.-Dwith_video=enabled— The--videooption, which sends the forwarded buffers as a video stream encoded and decoded through ffmpeg. It also needsglslcfrom shaderc, which compiles waypipe’s Vulkan shaders at build time.-Dwith_dmabuf=enabled— Forward DMA-BUFs, the buffers OpenGL and Vulkan programs share with the compositor, handling them through Vulkan (vulkan-loader).-Dwith_gbm=enabled— Use mesa’slibgbmas a limited fallback for DMA-BUFs where Vulkan cannot handle them.-Dwith_lz4=enabled,-Dwith_zstd=enabled— LZ4 and Zstandard compression of the forwarded data, through the lz4 and zstd ports.
Each with_ option is auto upstream, and an auto feature is dropped when its library is missing, or, for the features built on a wrapper crate, when bindgen is; enabled makes the configure fail instead.
The common switches of each build system are explained in the Flag glossary.
4. Package. kpkg removes libtool archives, the info directory index, mimeinfo.cache and every fonts.dir from $PKG, copies the source’s licence files into /usr/share/licenses/waypipe, prunes what the image does not ship, lints the tree and rolls it reproducibly:
tar --sort=name --format=gnu --numeric-owner --owner=0 --group=0 \
--mtime=@$SOURCE_DATE_EPOCH \
--use-compress-program='xz -9 -T0 --block-size=32MiB --no-adjust' \
-cf waypipe-0.11.2-1.tar.xz -C "$PKG" .
5. Adopt. kpkgadd installs the package’s files over the root, refusing a path another package owns, records the file list in /var/lib/kpkg/db/waypipe, and runs the triggers its paths call for.
Contents
Installed programs: waypipe.
Installed directories: /usr/share/licenses/waypipe.
Short descriptions
waypipe |
A transparent proxy for Wayland applications |
Notes
The crates come from waypipe-vendor-<version>.tar.xz, made by cargo vendor when ports/fetch sees vendoring = rust, and the build is offline (CARGO_NET_OFFLINE=true). The FFmpeg, LZ4, Zstandard and GBM wrappers are crates inside the source tree whose bindings bindgen generates against the installed headers at build time, which is why LIBCLANG_PATH is set and clang is in depends; see rust.
The machine at the other end needs waypipe too; openssh is in depends because waypipe ssh runs ssh.