-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
Simon McVittie authoredSigned-off-by:
Simon McVittie <smcv@collabora.com>
Contributing to steam-runtime-tools
(TODO: more general information here)
Doing test-builds
For quick tests during development, you can build on any reasonably modern Linux distribution. Ubuntu 18.04 and Debian 10 are examples of suitable versions.
To check that everything works in the older Steam Runtime 1 'scout'
environment, either use Gitlab-CI, or do a meson dist
on a modern
distribution and use that to build a package in the SteamRT environment.
The Gitlab-CI does the meson dist
in the build
step, and builds the
package on SteamRT in the autopkgtest
step.
You might find deb-build-snapshot useful for this. smcv uses this configuration for test-builds:
LC_ALL=C.UTF-8 \
deb-build-snapshot \
--upstream \
--source \
--download ~/tmp/build-area \
--deb-schroot steamrt_scout_amd64 \
--install-all \
build-vm
where build-vm
is a virtual machine with steam-runtime-tools'
dependencies and a steamrt_scout_amd64
chroot, that can be accessed
via ssh build-vm
. If the dependencies and chroot are available on your
development system, use localhost
, which will make deb-build-snapshot
do the build locally instead of using ssh.
Design notes
-
ABIs/architectures are identified by their Debian-style multiarch tuple, which is a GNU tuple (
x86_64-linux-gnu
,arm-linux-gnueabi
) with its CPU part normalized to the oldest/most compatible in a CPU family (soi386
, noti686
, andarm
, notarmv5tel
). Helper subprocesses are prefixed with the multiarch tuple, in the same style used for cross-compilers and cross-tools (x86_64-linux-gnu-inspect-library
,i386-linux-gnu-wflinfo
). -
Be careful when adding dependencies to the main library. GLib 2.32 (Ubuntu 12.04 'precise', SteamRT 1 'scout') can be relied on. JSON-GLib is OK (we have a backport in SteamRT 1 'scout'). Anything else is probably bad news.
- In particular, try not to pull in C++ ABIs, because incompatible C++ ABIs are one of the things that steam-runtime-tools should be able to detect and diagnose. We use C ABIs because they are the lowest common denominator for compatibility between distros.
-
Any checks that can reasonably crash should be in a subprocess. This means that if they crash, they don't bring down the entire Steam client with them.
-
Any checks that need to look at more than one ABI (32- and 64-bit) must be in a subprocess, so that the same process can run both.
-
The
inspect-library
helper should not have non-libc dependencies - not even GLib. Other helpers may have library dependencies if it is useful to do so. -
For system information and checks, new functionality should be accessed through
SrtSystemInfo
so that its cache lifetime can be managed. Separate access points likesrt_check_library_presence()
will be kept until the next ABI break, but don't add new ones.