Skip to content
Snippets Groups Projects
Commit cf8d0204 authored by Simon McVittie's avatar Simon McVittie
Browse files

Merge pressure-vessel into steam-runtime-tools


This allows them to evolve in lockstep, without having to wait for a
steam-runtime-tools release before using new things in pressure-vessel.

Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
parents dc1dcb44 797f075e
No related branches found
No related tags found
No related merge requests found
Showing with 2600 additions and 39 deletions
/_build/
.*.sw?
/.mypy_cache
/_build*/
/_build/
/build/
/builddir/
/libcapsule/
/libcapsule_*.dsc
/libcapsule_*.tar.[gx]z
/obj-*/
/pressure-vessel-[0-9]*.tar.gz
/relocatable-install/
/subprojects/steam-runtime-tools/
/tests/sysroots/
__pycache__/
Copyright © 2019 Collabora Ltd.
SPDX-License-Identifier: MIT and LGPL-2.1-or-later and Apache-2.0
SPDX-License-Identifier: MIT and Apache-2.0
See individual source files for copyright and licensing details, and
in particular pressure-vessel/THIRD-PARTY.md for details of third-party
libraries used or included in pressure-vessel releases.
See individual source files for details.
The shared library is under the MIT/X11 license:
The steam-runtime-tools shared library is under the MIT/X11 license:
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
......@@ -25,6 +25,10 @@ The shared library is under the MIT/X11 license:
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
The overall license of pressure-vessel is
LGPL-2.1-or-later <https://spdx.org/licenses/LGPL-2.1-or-later.html>,
which can be found in the file `COPYING.LGPL-2.1`.
For supporting code that is marked as being under the
Apache license version 2.0, the full license text can be found in
`COPYING.Apache-2.0`.
This diff is collapsed.
This diff is collapsed.
#!/bin/sh
# Print a version string.
scriptversion=2018-03-07.03; # UTC
# Copyright (C) 2007-2018 Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# This script is derived from GIT-VERSION-GEN from GIT: https://git-scm.com/.
# It may be run two ways:
# - from a git repository in which the "git describe" command below
# produces useful output (thus requiring at least one signed tag)
# - from a non-git-repo directory containing a .tarball-version file, which
# presumes this script is invoked like "./git-version-gen .tarball-version".
# In order to use intra-version strings in your project, you will need two
# separate generated version string files:
#
# .tarball-version - present only in a distribution tarball, and not in
# a checked-out repository. Created with contents that were learned at
# the last time autoconf was run, and used by git-version-gen. Must not
# be present in either $(srcdir) or $(builddir) for git-version-gen to
# give accurate answers during normal development with a checked out tree,
# but must be present in a tarball when there is no version control system.
# Therefore, it cannot be used in any dependencies. GNUmakefile has
# hooks to force a reconfigure at distribution time to get the value
# correct, without penalizing normal development with extra reconfigures.
#
# .version - present in a checked-out repository and in a distribution
# tarball. Usable in dependencies, particularly for files that don't
# want to depend on config.h but do want to track version changes.
# Delete this file prior to any autoconf run where you want to rebuild
# files to pick up a version string change; and leave it stale to
# minimize rebuild time after unrelated changes to configure sources.
#
# As with any generated file in a VC'd directory, you should add
# /.version to .gitignore, so that you don't accidentally commit it.
# .tarball-version is never generated in a VC'd directory, so needn't
# be listed there.
#
# Use the following line in your configure.ac, so that $(VERSION) will
# automatically be up-to-date each time configure is run (and note that
# since configure.ac no longer includes a version string, Makefile rules
# should not depend on configure.ac for version updates).
#
# AC_INIT([GNU project],
# m4_esyscmd([build-aux/git-version-gen .tarball-version]),
# [bug-project@example])
#
# Then use the following lines in your Makefile.am, so that .version
# will be present for dependencies, and so that .version and
# .tarball-version will exist in distribution tarballs.
#
# EXTRA_DIST = $(top_srcdir)/.version
# BUILT_SOURCES = $(top_srcdir)/.version
# $(top_srcdir)/.version:
# echo $(VERSION) > $@-t && mv $@-t $@
# dist-hook:
# echo $(VERSION) > $(distdir)/.tarball-version
me=$0
version="git-version-gen $scriptversion
Copyright 2011 Free Software Foundation, Inc.
There is NO warranty. You may redistribute this software
under the terms of the GNU General Public License.
For more information about these matters, see the files named COPYING."
usage="\
Usage: $me [OPTION]... \$srcdir/.tarball-version [TAG-NORMALIZATION-SED-SCRIPT]
Print a version string.
Options:
--prefix PREFIX prefix of git tags (default 'v')
--fallback VERSION
fallback version to use if \"git --version\" fails
--help display this help and exit
--version output version information and exit
Running without arguments will suffice in most cases."
prefix=v
fallback=
while test $# -gt 0; do
case $1 in
--help) echo "$usage"; exit 0;;
--version) echo "$version"; exit 0;;
--prefix) shift; prefix=${1?};;
--fallback) shift; fallback=${1?};;
-*)
echo "$0: Unknown option '$1'." >&2
echo "$0: Try '--help' for more information." >&2
exit 1;;
*)
if test "x$tarball_version_file" = x; then
tarball_version_file="$1"
elif test "x$tag_sed_script" = x; then
tag_sed_script="$1"
else
echo "$0: extra non-option argument '$1'." >&2
exit 1
fi;;
esac
shift
done
if test "x$tarball_version_file" = x; then
echo "$usage"
exit 1
fi
tag_sed_script="${tag_sed_script:-s/x/x/}"
nl='
'
# Avoid meddling by environment variable of the same name.
v=
v_from_git=
# First see if there is a tarball-only version file.
# then try "git describe", then default.
if test -f $tarball_version_file
then
v=`cat $tarball_version_file` || v=
case $v in
*$nl*) v= ;; # reject multi-line output
[0-9]*) ;;
*) v= ;;
esac
test "x$v" = x \
&& echo "$0: WARNING: $tarball_version_file is missing or damaged" 1>&2
fi
if test "x$v" != x
then
: # use $v
# Otherwise, if there is at least one git commit involving the working
# directory, and "git describe" output looks sensible, use that to
# derive a version string.
elif test "`git log -1 --pretty=format:x . 2>&1`" = x \
&& v=`git describe --abbrev=4 --match="$prefix*" HEAD 2>/dev/null \
|| git describe --abbrev=4 HEAD 2>/dev/null` \
&& v=`printf '%s\n' "$v" | sed "$tag_sed_script"` \
&& case $v in
$prefix[0-9]*) ;;
*) (exit 1) ;;
esac
then
# Is this a new git that lists number of commits since the last
# tag or the previous older version that did not?
# Newer: v6.10-77-g0f8faeb
# Older: v6.10-g0f8faeb
vprefix=`expr "X$v" : 'X\(.*\)-g[^-]*$'` || vprefix=$v
case $vprefix in
*-*) : git describe is probably okay three part flavor ;;
*)
: git describe is older two part flavor
# Recreate the number of commits and rewrite such that the
# result is the same as if we were using the newer version
# of git describe.
vtag=`echo "$v" | sed 's/-.*//'`
commit_list=`git rev-list "$vtag"..HEAD 2>/dev/null` \
|| { commit_list=failed;
echo "$0: WARNING: git rev-list failed" 1>&2; }
numcommits=`echo "$commit_list" | wc -l`
v=`echo "$v" | sed "s/\(.*\)-\(.*\)/\1-$numcommits-\2/"`;
test "$commit_list" = failed && v=UNKNOWN
;;
esac
# Change the penultimate "-" to ".", for version-comparing tools.
# Remove the "g" to save a byte.
v=`echo "$v" | sed 's/-\([^-]*\)-g\([^-]*\)$/.\1-\2/'`;
v_from_git=1
elif test "x$fallback" = x || git --version >/dev/null 2>&1; then
v=UNKNOWN
else
v=$fallback
fi
v=`echo "$v" |sed "s/^$prefix//"`
# Test whether to append the "-dirty" suffix only if the version
# string we're using came from git. I.e., skip the test if it's "UNKNOWN"
# or if it came from .tarball-version.
if test "x$v_from_git" != x; then
# Don't declare a version "dirty" merely because a timestamp has changed.
git update-index --refresh > /dev/null 2>&1
dirty=`exec 2>/dev/null;git diff-index --name-only HEAD` || dirty=
case "$dirty" in
'') ;;
*) # Append the suffix only if there isn't one already.
case $v in
*-dirty) ;;
*) v="$v-dirty" ;;
esac ;;
esac
fi
# Omit the trailing newline, so that m4_esyscmd can use the result directly.
printf %s "$v"
# Local variables:
# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC"
# End:
FROM @BASE_IMAGE@
COPY sources.list /etc/apt/sources.list.d/pressure-vessel.list
RUN \
set -eux; \
apt-get update; \
apt-get -y install \
bubblewrap \
libcapsule-tools-relocatable:amd64 \
libcapsule-tools-relocatable:i386 \
libblkid1 \
libcap2 \
libelf1:amd64 \
libelf1:i386 \
libffi6 \
libglib2.0-0 \
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+}
# Deliberately not including `rm -rf /var/lib/apt/lists/*`, because we
# need to be able to run `apt-get source` later
# vim:set sw=4 sts=4 et ft=dockerfile:
#!/usr/bin/env groovy
/*
* SPDX-License-Identifier: LGPL-2.1+
*
* Copyright © 2017-2018 Collabora Ltd
*
* This package is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This package is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this package. If not, see
* <http://www.gnu.org/licenses/>.
*/
pipeline {
options {
timestamps()
skipDefaultCheckout()
}
agent {
label 'docker-slave'
}
environment {
HOME="${env.WORKSPACE}"
TMPDIR="${env.WORKSPACE}"
PYTHONUNBUFFERED="1"
}
stages {
stage ("pressure-vessel") {
steps {
sh '''
git config --global user.name Jenkins
git config --global user.email nobody@example.com
'''
script {
if (env.CI_DOCKER_REGISTRY_CRED == '') {
dockerRegistryCred = null;
}
else {
dockerRegistryCred = env.CI_DOCKER_REGISTRY_CRED;
}
if (!env.CI_DOCKER_REGISTRY) {
env.CI_DOCKER_REGISTRY = 'docker.steamos.cloud'
}
if (!env.CI_DOCKER_IMAGE) {
env.CI_DOCKER_IMAGE = 'steamrt/sdk:scout'
}
if (!env.CI_DOCKER_OPTIONS) {
env.CI_DOCKER_OPTIONS = ''
}
if (!env.CI_PRESSURE_VESSEL_GIT_REPO) {
env.CI_PRESSURE_VESSEL_GIT_REPO = 'https://gitlab.steamos.cloud/steam/pressure-vessel.git'
}
if (!env.CI_PRESSURE_VESSEL_GIT_CRED) {
env.CI_PRESSURE_VESSEL_GIT_CRED = ''
}
if (!env.CI_APT_SOURCES_FILE) {
env.CI_APT_SOURCES_FILE = ''
}
if (env.CI_ALLOW_MISSING_SOURCES != 'true') {
env.CI_ALLOW_MISSING_SOURCES = ''
}
if (!env.CI_EXTRA_APT_SOURCES) {
env.CI_EXTRA_APT_SOURCES = ''
}
checkout changelog: true, poll: true, scm: [
$class: 'GitSCM',
branches: [[name: "origin/${env.CI_PRESSURE_VESSEL_GIT_BRANCH}"]],
extensions: [
[$class: 'RelativeTargetDirectory', relativeTargetDir: 'src'],
[$class: 'PruneStaleBranch'],
],
userRemoteConfigs: [
[name: 'origin', url: env.CI_PRESSURE_VESSEL_GIT_REPO, credentialsId: env.CI_PRESSURE_VESSEL_GIT_CRED]
]
]
}
dir('src') {
sh '''
set -eu
./build-aux/git-version-gen .tarball-version > .tarball-version_
mv .tarball-version_ .tarball-version
'''
}
sh '''
set -eu
sed -e 's!@BASE_IMAGE@!'"${CI_DOCKER_REGISTRY}/${CI_DOCKER_IMAGE}"'!g' < src/ci/Dockerfile.in > src/ci/Dockerfile
if [ -n "${CI_APT_SOURCES_FILE}" ]; then
cp "${CI_APT_SOURCES_FILE}" src/ci/sources.list
else
touch src/ci/sources.list
fi
echo "${CI_EXTRA_APT_SOURCES-}" | while read -r first rest; do
if [ "x$first" = xboth ]; then
echo "deb $rest" >> src/ci/sources.list
echo "deb-src $rest" >> src/ci/sources.list
else
echo "$first $rest" >> src/ci/sources.list
fi
done
'''
script {
docker.withRegistry("https://${env.CI_DOCKER_REGISTRY}", dockerRegistryCred) {
docker.build("${env.CI_DOCKER_REGISTRY}/pressure-vessel", '--no-cache --pull -f src/ci/Dockerfile src/ci').inside("${env.CI_DOCKER_OPTIONS}") {
sh '''
set -eu
cd src
meson \
--prefix="$(pwd)/_build/prefix" \
-Dsrcdir=src \
_build
ninja -C _build
meson test --verbose -C _build
ninja -C _build install
rm -fr ../relocatable-install
_build/prefix/bin/pressure-vessel-build-relocatable-install \
--output "${WORKSPACE}/relocatable-install" \
--archive "${WORKSPACE}" \
${CI_ALLOW_MISSING_SOURCES:+--allow-missing-sources} \
${NULL+}
if ! PYTHON=$(command -v python3.5); then
PYTHON=$(command -v python3)
fi
prove -v --exec "${PYTHON}" \
./tests/relocatable-install.py :: \
"${WORKSPACE}/relocatable-install"
'''
}
}
}
archiveArtifacts 'pressure-vessel-*-bin.tar.gz'
archiveArtifacts 'pressure-vessel-*-bin+src.tar.gz'
}
}
}
post {
cleanup {
deleteDir()
}
}
}
/* vim:set sw=2 sts=2 et: */
#define _GNU_SOURCE 1
#mesondefine VERSION
/* Allow using stuff from Flatpak with minimal modifications */
#define FLATPAK_EXTERN extern
#define _(s) s
#define C_(context, s) s
#define N_(s) s
#define NC_(s) s
#define Q_(s) g_strip_context (s, s)
#include "subprojects/libglnx/config.h"
......@@ -10,6 +10,8 @@
/libsteam-runtime-tools-0-relocatable-libs/
/libsteam-runtime-tools-0-tests/
/locales/
/pressure-vessel-libs-*/
/pressure-vessel-relocatable/
/steam-runtime-tools-bin/
/tmp/
/version.txt
This diff is collapsed.
......@@ -4,7 +4,7 @@ Priority: optional
Maintainer: Simon McVittie <smcv@collabora.com>
Standards-Version: 4.3.0
Build-Depends:
debhelper,
debhelper (>= 9),
g++ (>= 4:4.8) | g++-4.8,
glslang-tools,
gtk-doc-tools <!nodoc>,
......@@ -18,13 +18,14 @@ Build-Depends:
libvdpau-dev,
libvulkan-dev,
libx11-dev,
libxau-dev,
libxcb1-dev,
locales <!nocheck> | locales-all <!nocheck>,
meson (>= 0.49.0),
pandoc,
python3,
python3 (>= 3.5) | python3.5,
zlib1g <!nocheck>,
Build-Depends-Indep:
libglib2.0-dev,
Build-Conflicts:
libsteam-runtime-tools-0-helpers (<< 0.20191204.0~),
libsteam-runtime-tools-0-relocatable-libs,
......@@ -128,6 +129,53 @@ Description:
.
This package contains automated tests.
Package: pressure-vessel-relocatable
Section: games
Architecture: amd64 i386
Multi-Arch: foreign
Depends:
bubblewrap,
libcapsule-tools-relocatable (>= 0.20200707.0~),
python3 (>= 3.5) | python3.5,
steam-runtime-tools-bin,
${misc:Depends},
${shlibs:Depends},
Recommends:
pressure-vessel-libs-amd64,
pressure-vessel-libs-i386,
Description: Steam container launcher
pressure-vessel puts Steam games in containers.
.
This package contains the launcher.
Package: pressure-vessel-libs-amd64
Section: libs
Architecture: amd64
Multi-Arch: foreign
Depends:
libcapsule-tools-relocatable (>= 0.20200707.0~),
libsteam-runtime-tools-0-helpers,
${misc:Depends},
${shlibs:Depends},
Description: Steam container launcher - cross-architecture dependencies
pressure-vessel puts Steam games in containers.
.
This package encapsulates the amd64 cross-architecture dependencies.
Package: pressure-vessel-libs-i386
Section: libs
Architecture: i386
Multi-Arch: foreign
Depends:
libcapsule-tools-relocatable (>= 0.20200707.0~),
libsteam-runtime-tools-0-helpers,
${misc:Depends},
${shlibs:Depends},
Description: Steam container launcher - cross-architecture dependencies
pressure-vessel puts Steam games in containers.
.
This package encapsulates the i386 cross-architecture dependencies.
Package: steam-runtime-tools-bin
Architecture: any
Multi-Arch: foreign
......
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: Steam Runtime tools
License: Expat and GPL-2+
Comment: SPDX-License-Identifier: MIT and GPL-2.0-or-later
License: Expat and Apache-2.0 and LGPL-2.1+
Comment: SPDX-License-Identifier: MIT and Apache-2.0 and LGPL-2.1-or-later
Files:
*
debian/*
Copyright:
© 2019 Collabora Ltd.
© 2019-2020 Collabora Ltd.
License: Expat
Files:
pressure-vessel/*
subprojects/*
tests/shellcheck.sh
Copyright:
2014-2019 Red Hat, Inc
2017-2019 Collabora Ltd.
License: LGPL-2.1+
Files:
pressure-vessel/try-setlocale.*
Copyright:
2019 Collabora Ltd.
License: Expat
Files:
build-aux/git-version-gen
Copyright:
2007-2018 Free Software Foundation, Inc.
License: GPL-3+
Files:
subprojects/libglnx/*
Copyright:
1995-1997 Peter Mattis
1995-1997 Spencer Kimball
1995-1997 Josh MacDonald
2010-2011 Lennart Poettering
2012-2017 Colin Walters
2015 Canonical Limited
2017 Red Hat, Inc.
2017 Endless Mobile, Inc.
2019 Collabora Ltd.
License: LGPL-2+
License: Apache-2.0
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
.
http://www.apache.org/licenses/LICENSE-2.0
.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Comment:
SPDX-License-Identifier: Apache-2.0
License: Expat
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
......@@ -32,3 +82,54 @@ License: Expat
Comment:
SPDX-License-Identifier: MIT
License: LGPL-2.1+
SPDX-License-Identifier: LGPL-2.1-or-later
.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
Comment:
On Debian systems see /usr/share/common-licenses/LGPL-2.1
License: LGPL-2+
SPDX-License-Identifier: LGPL-2-or-later
.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
Comment:
On Debian systems see /usr/share/common-licenses/LGPL-2
License: GPL-3+
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Comment:
On Debian systems see /usr/share/common-licenses/GPL-3
......@@ -23,6 +23,7 @@ variables:
libvdpau-dev
libvulkan-dev
libx11-dev
libxau-dev
libxcb1-dev
libxcomposite-dev
locales
......@@ -30,6 +31,10 @@ variables:
pandoc
python3
python3.5
zlib1g
IMAGES_DOWNLOAD_URL: ''
IMAGES_DOWNLOAD_CREDENTIAL: ''
DEBIAN_FRONTEND: noninteractive
......@@ -71,10 +76,11 @@ build:devel:
mkdir -p -m700 "${STEAM_CI_TMPDIR}"
export TMPDIR="${STEAM_CI_TMPDIR}"
meson --werror -Dman=true _build-devel
ninja -C _build-devel
ninja -C _build-devel install
meson test --verbose -C _build-devel
mkdir -p _build
meson --werror -Dman=true _build/devel
ninja -C _build/devel
ninja -C _build/devel install
meson test --verbose -C _build/devel
export CC=clang
export CXX=clang++
......@@ -83,16 +89,16 @@ build:devel:
-Db_lundef=false \
-Db_sanitize=address,undefined \
--werror \
_build-clang-asan
ninja -C _build-clang-asan
ninja -C _build-clang-asan scan-build
ninja -C _build-clang-asan install
meson test --verbose -C _build-clang-asan
_build/clang-asan
ninja -C _build/clang-asan
ninja -C _build/clang-asan scan-build
ninja -C _build/clang-asan install
meson test --verbose -C _build/clang-asan
artifacts:
paths:
- _build-devel/meson-logs/*.txt
- _build-clang-asan/meson-logs/*.txt
- _build/devel/meson-logs/*.txt
- _build/clang-asan/meson-logs/*.txt
build:scout:
stage: build
......@@ -122,24 +128,198 @@ build:scout:
apt-get -y update
fi
# We need up-to-date packages for the relocatable install to
# be able to get its source code
apt-get -y dist-upgrade
apt-get -y --no-install-recommends install \
bubblewrap \
libcapsule0 \
libcapsule-tools-relocatable:amd64 \
libcapsule-tools-relocatable:i386 \
libglib2.0-dev \
libxau-dev \
meson \
${NULL+}
# g++ 4.6 is too old (see also debian/rules)
export CXX=g++-4.8
mkdir -p -m700 "${STEAM_CI_TMPDIR}"
export TMPDIR="${STEAM_CI_TMPDIR}"
mkdir -p _build
meson \
--prefix="$(pwd)/_build/scout/prefix" \
-Dsrcdir=src \
--werror \
_build/scout-i386
ninja -C _build/scout-i386
G_MESSAGES_DEBUG=all meson test --verbose -C _build/scout-i386
ninja -C _build/scout-i386 install
meson \
--prefix="$(pwd)/_build-scout/prefix" \
--prefix="$(pwd)/_build/scout/prefix" \
-Dsrcdir=src \
--werror \
_build-scout
ninja -C _build-scout
G_MESSAGES_DEBUG=all meson test --verbose -C _build-scout
ninja -C _build-scout install
_build/scout
ninja -C _build/scout
G_MESSAGES_DEBUG=all meson test --verbose -C _build/scout
ninja -C _build/scout install
rm -fr _build/scout/relocatable-install
_build/scout/prefix/lib/pressure-vessel/relocatable/bin/pressure-vessel-build-relocatable-install \
--output _build/scout/relocatable-install \
--archive "$(pwd)/_build/scout" \
${CI_ALLOW_MISSING_SOURCES:+--allow-missing-sources} \
${NULL+}
prove -epython3.5 -v ./tests/relocatable-install.py :: \
"$(pwd)/_build/scout/relocatable-install"
artifacts:
paths:
- _build/scout/pressure-vessel-*-bin.tar.gz
- _build/scout/pressure-vessel-*-bin+src.tar.gz
- _build/scout/meson-logs/*.txt
.prepare_test: &prepare_test
- |
set -eux
PRESSURE_VESSEL=$(ls _build/scout/pressure-vessel-*-bin.tar.gz | head -1)
if [ -n "${IMAGES_DOWNLOAD_URL}" ] && [ -n "${IMAGES_DOWNLOAD_CREDENTIAL}" ]; then
python3 populate-depot.py \
--depot=_build/depot \
--include-sdk \
--unpack-runtimes \
--credential-env IMAGES_DOWNLOAD_CREDENTIAL \
--images-uri "${IMAGES_DOWNLOAD_URL}"/steamrt-SUITE/snapshots \
--pressure-vessel "${PRESSURE_VESSEL}" \
scout \
soldier \
${NULL+}
else
python3 populate-depot.py \
--depot=_build/depot \
--include-sdk \
--unpack-runtimes \
--pressure-vessel "${PRESSURE_VESSEL}" \
--version latest-steam-client-public-beta \
scout \
${NULL+}
fi
.i386_dependencies: &i386_dependencies
- |
set -eux
dpkg --add-architecture i386
apt-get -y update
apt-get -y --no-install-recommends install \
libc6-i386 \
libgl1-mesa-dri:i386 \
${NULL+}
.test_template:
needs:
- "build:scout"
stage: test
tags:
- docker
- linux
variables:
STEAM_CI_DEPENDENCIES: >-
libgl1-mesa-dri
locales
python3
test:buster:
extends: .test_template
image: debian:buster-slim
script:
- *prepare_test
- *i386_dependencies
- |
set -eux
export AUTOPKGTEST_ARTIFACTS="$(pwd)/_buster_test_logs"
export PRESSURE_VESSEL_TEST_CONTAINERS="$(pwd)/_build/depot"
python3 tests/containers.py
artifacts:
paths:
- _buster_test_logs
test:bionic:
extends: .test_template
image: ubuntu:18.04
script:
- *prepare_test
- *i386_dependencies
- |
set -eux
export AUTOPKGTEST_ARTIFACTS="$(pwd)/_bionic_test_logs"
export PRESSURE_VESSEL_TEST_CONTAINERS="$(pwd)/_build/depot"
python3 tests/containers.py
artifacts:
paths:
- _bionic_test_logs
test:focal:
extends: .test_template
image: ubuntu:20.04
script:
- *prepare_test
- *i386_dependencies
- |
set -eux
export AUTOPKGTEST_ARTIFACTS="$(pwd)/_ubuntu_focal_test_logs"
export PRESSURE_VESSEL_TEST_CONTAINERS="$(pwd)/_build/depot"
python3 tests/containers.py
artifacts:
paths:
- _ubuntu_focal_test_logs
test:archlinux:
extends: .test_template
image: archlinux:latest
# TODO this test does not work yet
when: manual
# Do not use the global before_script because it is only for Debian based
# distros
before_script:
- |
set -eux
pacman -Syu --needed --noconfirm --noprogressbar \
base-devel \
git \
python \
python-tappy \
sudo \
${NULL+}
tempdir="$(mktemp -d)"
git clone --branch debian/buster https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.steamos.cloud/packaging/python-debian.git "$tempdir/python-debian"
export PYTHONPATH="$tempdir/python-debian/lib"
script:
- *prepare_test
- |
set -eux
export AUTOPKGTEST_ARTIFACTS="$(pwd)/_archlinux_test_logs"
export PRESSURE_VESSEL_TEST_CONTAINERS="$(pwd)/_build/depot"
python3 tests/containers.py
artifacts:
paths:
- _build-scout/meson-logs/*.txt
- _archlinux_test_logs
autopkgtest:
stage: test
......@@ -149,5 +329,8 @@ autopkgtest:
STEAM_CI_INSTALL_SCRIPT: |
# Workaround for the build regression described in !88
apt-get -y remove libsteam-runtime-tools-0-helpers
# We need up-to-date packages for the relocatable install to
# be able to get its source code
apt-get -y dist-upgrade
# vim:set sw=4 sts=4 et:
usr/lib/pressure-vessel/relocatable
#!/usr/bin/make -f
# Copyright © 2019 Collabora Ltd.
# Copyright © 2019-2020 Collabora Ltd.
# SPDX-License-Identifier: MIT
# (see debian/copyright)
......@@ -48,17 +48,24 @@ DESTDIR := $(CURDIR)/debian/tmp
relocatable_pkglibdir := $(CURDIR)/debian/libsteam-runtime-tools-0-relocatable-libs/usr/$(pkglibdir)
override_dh_auto_configure:
meson builddir \
if ! meson builddir \
--prefix=/usr \
--libexecdir=$(libexecdir) \
--libdir=$(libdir) \
-Dgtk_doc=$(gtk_doc_has_cflags) \
-Dintrospection=false \
-Dman=true \
-Dmultiarch_tuple=$(DEB_HOST_MULTIARCH) \
$(meson_options)
-Dsrcdir=src \
-Dversion=$(DEB_VERSION) \
$(meson_options) \
; then \
cat builddir/meson-logs/meson-log.txt; \
exit 1; \
fi
override_dh_auto_build:
ninja -C builddir
ninja -v -C builddir
override_dh_auto_test:
ifeq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),)
......
extend-diff-ignore=(?:^|/)\.git(?:/|$)
extend-diff-ignore=(?:^|/)_build(?:/|$)
extend-diff-ignore=(?:^|/)subprojects/steam-runtime-tools(?:/|$)
tar-ignore=.git
tar-ignore=_build
tar-ignore=subprojects/steam-runtime-tools
......@@ -13,3 +13,13 @@ Restrictions: allow-stderr, skip-not-installable
Depends:
gnome-desktop-testing,
libsteam-runtime-tools-0-tests,
Tests: relocatable-install
Depends:
libsteam-runtime-tools-0-0,
libsteam-runtime-tools-0-helpers,
pressure-vessel-relocatable,
pressure-vessel-libs-amd64 [amd64],
pressure-vessel-libs-i386 [i386],
steam-runtime-tools-bin,
Restrictions: allow-stderr, needs-root
#!/bin/sh
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 \
${CI_ALLOW_MISSING_SOURCES:+--allow-missing-sources} \
--output "${AUTOPKGTEST_TMP}/relocatable-install" \
--archive "${AUTOPKGTEST_TMP}"
if command -v python3.5; then
PYTHON=python3.5
else
PYTHON=python3
fi
"$PYTHON" ./tests/pressure-vessel/relocatable-install.py \
"${AUTOPKGTEST_TMP}/relocatable-install"
for archive in "${AUTOPKGTEST_TMP}"/*.tar.*; do
echo "==== $(basename "$archive") ===="
tar -tvf "$archive"
done
# TODO: When the coordinator can accept bigger artifacts, use
# --archive=${AUTOPKGTEST_ARTIFACTS} instead
......@@ -22,7 +22,7 @@
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
project(
'steam-runtime-tools', 'c',
'steam-runtime-tools', 'c', 'cpp',
version : '0.20200908.1',
default_options: [
'c_std=c99',
......@@ -49,6 +49,15 @@ else
python = find_program(get_option('python'), required : true)
endif
if get_option('fully_featured_python') == ''
full_python = find_program('python3', required : false)
else
full_python = find_program(
get_option('fully_featured_python'),
required : false,
)
endif
if get_option('man')
pandoc = find_program('pandoc', required : true)
......@@ -63,7 +72,25 @@ if get_option('man')
endif
endif
dbus_run_session = find_program('dbus-run-session', required : false)
glslang_validator = find_program('glslangValidator', required : true)
prove = find_program('prove', required : false)
sh = find_program('sh', required : true)
version = get_option('version')
if version == 'auto'
git_version_gen = run_command(
sh,
files('build-aux/git-version-gen'),
join_paths(meson.current_source_dir(), '.tarball-version'),
check : true,
)
version = git_version_gen.stdout().strip()
endif
if version == ''
version = meson.project_version()
endif
warning_flags = [
'-Warray-bounds',
......@@ -106,12 +133,14 @@ warning_cxxflags = warning_flags + [
]
no_warning_flags = [
'cast-align',
'inline',
'missing-field-initializers',
'pedantic',
'sign-compare',
'unused-local-typedefs',
'unused-parameter',
'variadic-macros',
]
no_warning_cflags = no_warning_flags + [
'declaration-after-statement',
......@@ -131,7 +160,7 @@ foreach flag : no_warning_cflags
'-Wno-error=' + flag,
'-Wno-' + flag,
])
add_project_arguments(supported_no_warning_cflags, language : 'c')
add_global_arguments(supported_no_warning_cflags, language : 'c')
endforeach
foreach flag : no_warning_cxxflags
......@@ -139,9 +168,22 @@ foreach flag : no_warning_cxxflags
'-Wno-error=' + flag,
'-Wno-' + flag,
])
add_project_arguments(supported_no_warning_cxxflags, language : 'cpp')
add_global_arguments(supported_no_warning_cxxflags, language : 'cpp')
endforeach
# gdbus-codegen in scout generates code that has many warnings
silence_gdbus_codegen_warnings = c_compiler.get_supported_arguments([
'-Wno-error',
'-Wno-error=discarded-qualifiers',
'-Wno-error=redundant-decls',
'-Wno-error=shadow',
'-Wno-error=write-strings',
'-Wno-discarded-qualifiers',
'-Wno-redundant-decls',
'-Wno-shadow',
'-Wno-write-strings',
])
add_project_link_arguments(
c_compiler.get_supported_link_arguments(
'-Wl,-z,origin',
......@@ -156,10 +198,10 @@ add_project_link_arguments(
)
conf_data = configuration_data()
conf_data.set('_GNU_SOURCE', '1')
conf_data.set_quoted('VERSION', meson.project_version())
conf_data.set_quoted('VERSION', version)
configure_file(
input : 'config.h.in',
output : '_steam-runtime-tools-config.h',
configuration : conf_data,
)
......@@ -226,6 +268,8 @@ vulkan = dependency(
'vulkan',
)
xau = dependency('xau', required : true)
xcb = dependency(
'xcb',
)
......@@ -240,8 +284,16 @@ xlib = dependency(
libdl = c_compiler.find_library('dl', required : false)
libglnx = subproject('libglnx')
project_include_dirs = include_directories('.')
pv_include_dirs = include_directories(
'.',
'pressure-vessel',
'subprojects',
)
# Relative path from get_option('prefix') to our private library directory
pkglibdir = join_paths(
get_option('libdir'),
......@@ -282,7 +334,14 @@ if multiarch != ''
subdir('helpers')
endif
subdir('bin')
if get_option('bin')
subdir('bin')
endif
if get_option('pressure_vessel') and get_option('bin')
subdir('pressure-vessel')
endif
subdir('docs')
subdir('tests')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment