Skip to content

Move some pressure-vessel-specific code into common code

Simon McVittie requested to merge wip/smcv/into-library1 into main

Since commit 7627197e "steam-runtime-tools: Separate out modules not in the shared library" we can share code between pressure-vessel/ and bin/ without enlarging the shared library. This is likely to be helpful for anything that wants to run a helper executable from scout, such as steamrt/tasks#387 and steamrt/tasks#393.

  • library: Add fallback F_OFD_ constants to missing-internal.h

  • pressure-vessel: Move missing.h into common code

  • Rename PvBwrapLock to SrtFileLock and move it to common code

    This was implemented to interact correctly with the locking scheme used in bwrap(1) (which uses the non-OFD flavour of fnctl locks), but is otherwise unrelated to bwrap(1) or pressure-vessel. Moving this into common code will facilitate using it outside pressure-vessel, in particular when unpacking ubuntu12_64/steam-runtime-sniper/.

    While I'm changing the interface anyway, take the opportunity to rename the WRITE flag to EXCLUSIVE, which is clearer.

    Helps: steamrt/tasks#387

  • utils: Pass program name to _srt_async_signal_safe_error separately

    This will let us call it (carefully) from library code.

    While we're changing its signature, also don't require the caller to pass a string that ends with a newline, making it more like g_error(). It turns out that we got this wrong in one place already.

  • tests: Stop using Flatpak code

    It's simpler if we avoid layering violations in the build system, and using flatpak_quote_argv() here doesn't buy us much.

Edited by Simon McVittie

Merge request reports