diff --git a/.gitignore b/.gitignore index 329b876b0cb8c836d0fb24568df2d53c61c97aa6..54314a50d115608f9b2255a044fb9a56ce97bac6 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ /libcapsule_*.tar.[gx]z /pressure-vessel-[0-9]*.tar.gz /relocatable-install/ +/subprojects/steam-runtime-tools/ diff --git a/THIRD-PARTY.md b/THIRD-PARTY.md index aab21266a4b48e21ad136e0fd7def75e64c02cb3..e4c524bc04063a9621c50f6779a535a16feb0f22 100644 --- a/THIRD-PARTY.md +++ b/THIRD-PARTY.md @@ -10,11 +10,17 @@ same place as pressure-vessel, or from pressure-vessel incorporates code from GNOME libglnx, variously licensed under [LGPL-2.0-or-later][] and [LGPL-2.1-or-later][]. Complete source code can be obtained from the same place as -pressure-vessel. +pressure-vessel, or from <http://repo.steampowered.com/steamrt/>. pressure-vessel incorporates code from Flatpak, licensed under [LGPL-2.1-or-later][]. Complete source code can be obtained from the -same place as pressure-vessel. +same place as pressure-vessel, or from +<http://repo.steampowered.com/steamrt/>. + +pressure-vessel includes the steam-runtime-tools library and utilities, +which are licensed under the [MIT][] license. See steam-runtime-tools.txt. +Complete source code can be obtained from the same place as pressure-vessel, +or from <http://repo.steampowered.com/steamrt/>. Binary releases of pressure-vessel include the following third-party programs and libraries: @@ -47,6 +53,9 @@ programs and libraries: - libz.so.1 from zlib: [Zlib][] license. See zlib.txt. +- libjson-glib-1.0.so.0 from json-glib: [LGPL-2.0-or-later][]. See + json-glib.txt. + Complete source code can be obtained from the same place as pressure-vessel, or from <http://repo.steampowered.com/steamrt/>. diff --git a/build-relocatable-install.py b/build-relocatable-install.py index cf86be7c5a03069468bfefe48d2bedfda3f14dcd..8bd52e776b120efcec360df4fefa9be7fe1a4a5f 100755 --- a/build-relocatable-install.py +++ b/build-relocatable-install.py @@ -78,11 +78,13 @@ ARCHS = [ DEPENDENCIES = { 'libcapsule-tools-relocatable': 'libcapsule', 'libelf1': 'elfutils', + 'libsteam-runtime-tools-0-helpers': 'steam-runtime-tools', 'zlib1g': 'zlib', } # program to install => binary package WRAPPED_PROGRAMS = { 'bwrap': 'bubblewrap', + 'steam-runtime-system-info': 'steam-runtime-tools-bin', } PRIMARY_ARCH_DEPENDENCIES = { 'bubblewrap': 'bubblewrap', @@ -90,10 +92,12 @@ PRIMARY_ARCH_DEPENDENCIES = { 'libcap2': 'libcap2', 'libffi6': 'libffi', 'libglib2.0-0': 'glib2.0', + 'libjson-glib-1.0-0': 'json-glib', 'libmount1': 'util-linux', 'libpcre3': 'pcre3', - 'libxau6': 'libxau', 'libselinux1': 'libselinux', + 'libsteam-runtime-tools-0-0': 'steam-runtime-tools', + 'libxau6': 'libxau', } SCRIPTS = [ 'pressure-vessel-locale-gen', @@ -233,6 +237,7 @@ def main(): raise RuntimeError('--output directory must not already exist') os.makedirs(os.path.join(installation, 'bin'), exist_ok=True) + os.makedirs(os.path.join(installation, 'libexec'), exist_ok=True) os.makedirs(os.path.join(installation, 'metadata'), exist_ok=True) for arch in ARCHS: @@ -291,6 +296,35 @@ def main(): os.path.join(installation, 'bin'), ) + path = '/usr/libexec/steam-runtime-tools-0' + + if not os.path.exists(path): + package = 'libsteam-runtime-tools-0-helpers' + v_check_call([ + 'apt-get', + 'download', + package + ':' + arch.name, + ], cwd=tmpdir) + v_check_call( + 'dpkg-deb -X {}_*_{}.deb build-relocatable'.format( + quote(package), + quote(arch.name), + ), + cwd=tmpdir, + shell=True, + ) + path = '{}/build-relocatable/{}'.format(tmpdir, path) + + for tool in glob.glob(os.path.join(path, arch.multiarch + '-*')): + install_exe( + tool, + os.path.join( + installation, + 'libexec', + 'steam-runtime-tools-0', + ), + ) + primary_architecture = subprocess.check_output([ 'dpkg', '--print-architecture', ]).decode('utf-8').strip() @@ -329,8 +363,10 @@ def main(): 'soname:libXau.so.6', 'soname:libcap.so.2', 'soname:libgio-2.0.so.0', + 'soname:libjson-glib-1.0.so.0', 'soname:libpcre.so.3', 'soname:libselinux.so.1', + 'soname:libsteam-runtime-tools-0.so.0', ]) for so in glob.glob( diff --git a/ci/Dockerfile.in b/ci/Dockerfile.in index 86e6adba22d4026222dc143f93f77f0b3b2c942c..29def092ee4b20e919879837633dcc094771a25a 100644 --- a/ci/Dockerfile.in +++ b/ci/Dockerfile.in @@ -17,9 +17,13 @@ apt-get -y install \ libmount1 \ libpcre3 \ libselinux1 \ + libsteam-runtime-tools-0-dev \ + libsteam-runtime-tools-0-helpers:amd64 \ + libsteam-runtime-tools-0-helpers:i386 \ libxau6 \ locales \ pandoc \ + steam-runtime-tools-bin \ zlib1g:amd64 \ zlib1g:i386 \ ${NULL+} diff --git a/debian/control b/debian/control index 8d88b32de8ef242d0b95b1bf406ea832941f6412..ca0653a5e3f068f2566c2179c326f8b75ae82204 100644 --- a/debian/control +++ b/debian/control @@ -6,6 +6,7 @@ Standards-Version: 4.4.0 Build-Depends: debhelper (>= 9), libglib2.0-dev, + libsteam-runtime-tools-0-dev, libxau-dev, locales <!nocheck> | locales-all <!nocheck>, meson, @@ -22,6 +23,7 @@ Multi-Arch: foreign Depends: bubblewrap, libcapsule-tools-relocatable, + steam-runtime-tools-bin, ${misc:Depends}, ${shlibs:Depends}, Recommends: @@ -37,6 +39,7 @@ Architecture: amd64 Multi-Arch: foreign Depends: libcapsule-tools-relocatable, + libsteam-runtime-tools-0-helpers, ${misc:Depends}, ${shlibs:Depends}, Description: Steam container launcher - cross-architecture dependencies @@ -49,6 +52,7 @@ Architecture: i386 Multi-Arch: foreign Depends: libcapsule-tools-relocatable, + libsteam-runtime-tools-0-helpers, ${misc:Depends}, ${shlibs:Depends}, Description: Steam container launcher - cross-architecture dependencies diff --git a/debian/gitlab-ci.yml b/debian/gitlab-ci.yml index 430e49fcff1797fa9288e6ee73a505180b7e700c..4ff147849a8587c9d51508af9c8c019547294a24 100644 --- a/debian/gitlab-ci.yml +++ b/debian/gitlab-ci.yml @@ -29,6 +29,9 @@ variables: # Set non-empty to allow CI_ALLOW_MISSING_SOURCES: '' + STEAM_RUNTIME_TOOLS_GIT_REPO: https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.steamos.cloud/steam/steam-runtime-tools.git + STEAM_RUNTIME_TOOLS_GIT_BRANCH: master + build: variables: BUILD_IMAGE: docker.internal.steamos.cloud/steamos/package-builder:buster @@ -40,11 +43,10 @@ build:devel: - | set -eux - apt-get -y --no-install-recommends install \ - libglib2.0-dev \ - libxau-dev \ - meson \ - ${NULL+} + git clone \ + -b${STEAM_RUNTIME_TOOLS_GIT_BRANCH} \ + ${STEAM_RUNTIME_TOOLS_GIT_REPO} \ + subprojects/steam-runtime-tools meson _build ninja -C _build @@ -81,9 +83,13 @@ build:scout: libcapsule0 \ libcapsule-tools-relocatable:amd64 \ libcapsule-tools-relocatable:i386 \ + libsteam-runtime-tools-0-dev \ + libsteam-runtime-tools-0-helpers:amd64 \ + libsteam-runtime-tools-0-helpers:i386 \ libglib2.0-dev \ libxau-dev \ meson \ + steam-runtime-tools-bin ${NULL+} meson \ diff --git a/debian/tests/relocatable-install b/debian/tests/relocatable-install index 5bd50727a8e23285290c36ecbeff6aba509b3551..5a623a1dfe3ace957baf87c3ebcb4b28d0e78f86 100755 --- a/debian/tests/relocatable-install +++ b/debian/tests/relocatable-install @@ -4,9 +4,15 @@ set -eux dpkg --add-architecture amd64 dpkg --add-architecture i386 +apt-get -y update apt-get -y install \ libcapsule-tools-relocatable:amd64 \ libcapsule-tools-relocatable:i386 \ + libsteam-runtime-tools-0-0:amd64 \ + libsteam-runtime-tools-0-0:i386 \ + libsteam-runtime-tools-0-helpers:amd64 \ + libsteam-runtime-tools-0-helpers:i386 \ + steam-runtime-tools-bin \ ${NULL+} /usr/lib/pressure-vessel/relocatable/bin/pressure-vessel-build-relocatable-install \ diff --git a/meson.build b/meson.build index 295cae89abd3670b58e29f2bcbf18e1610bf5d79..30d2004f3d60e404d53b3579ddfc3af6faada974 100644 --- a/meson.build +++ b/meson.build @@ -177,6 +177,12 @@ executable( '-Wno-unused-local-typedefs', ], dependencies : [ + dependency( + 'steam-runtime-tools-0', + required : true, + fallback : ['steam-runtime-tools', 'libsteamrt_dep'], + default_options : ['gtk_doc=false'], + ), dependency('gio-unix-2.0', required : true), dependency('xau', required : true), subproject('libglnx').get_variable('libglnx_dep'), diff --git a/src/wrap.c b/src/wrap.c index a621b73653e00e2ccb0eb60751d5046945046ae1..164733e43d0a94541f5ad9173ed586e89f0b6059 100644 --- a/src/wrap.c +++ b/src/wrap.c @@ -33,10 +33,14 @@ #include <stdlib.h> #include <sysexits.h> +/* Include these before steam-runtime-tools.h so that their backport of + * G_DEFINE_AUTOPTR_CLEANUP_FUNC will be visible to it */ +#include "glib-backports.h" #include "libglnx.h" +#include <steam-runtime-tools/steam-runtime-tools.h> + #include "bwrap.h" -#include "glib-backports.h" #include "flatpak-bwrap-private.h" #include "flatpak-run-private.h" #include "flatpak-utils-private.h" diff --git a/subprojects/steam-runtime-tools.wrap b/subprojects/steam-runtime-tools.wrap new file mode 100644 index 0000000000000000000000000000000000000000..f30180ac0896545be6bbb92a3f6a83a1738b9919 --- /dev/null +++ b/subprojects/steam-runtime-tools.wrap @@ -0,0 +1,4 @@ +[wrap-git] +directory = steam-runtime-tools +url = https://gitlab.steamos.cloud/steam/steam-runtime-tools.git +revision = head