...
 
Commits (2)
[submodule "flatdeb"]
path = flatdeb
url = https://gitlab.collabora.com/smcv/flatdeb.git
flatdeb
=======
flatdeb - Steam
===============
flatdeb is a proof of concept for building Flatpak runtimes and apps
from Debian packages.
from Debian packages. This repository sets it up for Steam.
Walkthrough
-----------
......@@ -20,40 +20,37 @@ Also install the latest versions of
[fakemachine](https://github.com/go-debos/fakemachine)
and [debos](https://github.com/go-debos/debos).
Also edit org.debian.packages.openarena.yaml to specify where you have
put local clones of ioquake3 and openarena if you can't (or don't
want to) clone them via https.
You will probably want to use a caching proxy such as apt-cacher-ng to
download `.deb` packages, which you can do by prefixing all the commands
below with `env http_proxy=http://192.168.122.1:3142` or similar.
Finally, put a copy of debian-archive-keyring.gpg in this directory.
Finally, put exported Ubuntu, Steam Runtime and SteamOS keys in
suites/valve-archive-keyring.gpg (0x9E46D8DCD0BBF5AE and
0x7DEEB7438ABDDD96), suites/valve-steam-keyring.gpg (0xF24AEA9FB05498B7)
and suites/ubuntu-archive-keyring.gpg (ubuntu-archive-keyring).
Then you can run:
./run.py --suite=stretch --arch=amd64 base
./run.py --suite=stretch --arch=amd64 runtimes \
runtimes/net.debian.flatpak.Base.yaml
./run.py --suite=stretch --arch=amd64 runtimes \
runtimes/net.debian.flatpak.Games.yaml
./run.py --suite=stretch --arch=amd64 app \
apps/org.debian.packages.hello.yaml
./run.py --suite=stretch --arch=amd64 app \
apps/org.debian.packages.openarena.yaml
./run.py --suite=stretch --arch=amd64 app \
flatdeb/run.py --suite=scout_beta --arch=amd64,i386 base
flatdeb/run.py --suite=scout_beta --arch=i386 base
flatdeb/run.py --suite=scout_beta --arch=amd64,i386 runtimes \
runtimes/scout.yaml
flatdeb/run.py --suite=scout_beta --arch=i386 runtimes \
runtimes/scout.yaml
flatdeb/run.py --arch=amd64,i386 app \
apps/org.debian.packages.mesa_utils.yaml
flatdeb/run.py --arch=i386 app \
apps/org.debian.packages.mesa_utils.yaml
flatdeb/run.py --arch=amd64,i386 app \
apps/com.valvesoftware.Steam.yaml
flatdeb/run.py --arch=i386 app \
apps/com.valvesoftware.Steam.yaml
On the same machine, or a test machine onto which you have copied
On the host, or a test machine onto which you have copied
`$HOME/.cache/flatdeb/repo` with `rsync` or similar:
flatpak --user remote-add --no-gpg-verify flatdeb $HOME/.cache/flatdeb/repo
flatpak --user install flatdeb org.debian.packages.hello
flatpak run org.debian.packages.hello
flatpak --user install flatdeb org.debian.packages.openarena
flatpak run org.debian.packages.openarena
Bonus content: Steam as a Flatpak, with multiarch
-------------------------------------------------
https://github.com/smcv/flatdeb-steam
flatpak --user install flatdeb org.debian.packages.mesa_utils
flatpak run org.debian.packages.mesa_utils
flatpak --user install flatdeb com.valvesoftware.Steam
flatpak run com.valvesoftware.Steam
---
id: com.valvesoftware.Steam
branch: scout_beta
runtime: com.valvesoftware.SteamRuntime.Platform
runtime-version: scout_beta
sdk: com.valvesoftware.SteamRuntime.Sdk
command: steam
tags:
- proprietary
modules:
- name: steam-launcher
x-flatdeb-apt-packages:
- steam-launcher
sources:
- type: file
path: flatdeb/deb-buildapi/configure
dest: '.'
- type: file
path: flatdeb/deb-buildapi/Makefile
finish-args:
- --allow=multiarch
- --device=all
- --persist=.steam
- --share=ipc
- --share=network
- --socket=pulseaudio
- --socket=system-bus
- --socket=x11
- --talk-name=org.freedesktop.NetworkManager
- --talk-name=org.gnome.SettingsDaemon
- --talk-name=org.kde.StatusNotifierWatcher
# FIXME: This should be the runtime's job, but requires a generic way
# to detect which flavour of GL driver selection is in use. Maybe one
# day glvnd will save us all.
- --env=LD_LIBRARY_PATH=/app/lib:/usr/lib/x86_64-linux-gnu/mesa:/usr/lib/i386-linux-gnu/mesa
# Assume the Flatpak runtime provides all the libraries needed
- --env=STEAM_RUNTIME=0
cleanup-commands:
- sed -i -e '2,$s,/usr/,/app/,g' /app/bin/steam
- sed -i -e 's,/usr/bin/steam,/app/bin/steam,g' /app/share/applications/*.desktop
- sed -i -e 's,[$]STEAMPACKAGE[.]desktop,com.valvesoftware.Steam.desktop,g' /app/bin/steam
# Allow launching in beta mode by running with --command=
- ln -s steam /app/bin/steambeta
- ln -s steamdeps /app/bin/steambetadeps
rename-desktop-file: steam.desktop
rename-icon: steam
desktop-file-name-prefix: "flatdeb "
...
---
id: org.debian.packages.mesa_utils
branch: master
runtime: net.debian.flatpak.Games.Platform
sdk: net.debian.flatpak.Games.Sdk
branch: scout_beta
runtime: com.valvesoftware.SteamRuntime.Platform
sdk: com.valvesoftware.SteamRuntime.Sdk
command: glxgears
writable-sdk: true
finish-args:
- --share=ipc
- --socket=x11
......@@ -14,7 +15,7 @@ modules:
- mesa-utils
sources:
- type: file
path: deb-buildapi/configure
path: flatdeb/deb-buildapi/configure
- type: file
path: deb-buildapi/Makefile
path: flatdeb/deb-buildapi/Makefile
...
---
apt_components:
- main
- contrib
- non-free
debootstrap_script: 'jessie'
sources:
- apt_uri: 'http://repo.steampowered.com/steamos'
keyring: 'valve-archive-keyring.gpg'
- apt_uri: 'http://deb.debian.org/debian'
apt_suite: 'jessie'
keyring: 'debian-archive-keyring.gpg'
- apt_uri: 'http://repo.steampowered.com/steam'
apt_suite: 'precise'
keyring: 'valve-steam-keyring.gpg'
apt_components:
- steam
...
......@@ -42,9 +42,10 @@ pipeline {
PYTHONUNBUFFERED="1"
TMPDIR="${env.WORKSPACE}"
XDG_CACHE_HOME="${env.WORKSPACE}/cache"
suites="stretch"
archs="amd64 i386"
runtimes="Base Games"
suites="scout scout_beta"
archs="amd64,i386 i386"
runtimes="com.valvesoftware.SteamRuntime"
apps="org.debian.packages.mesa_utils com.valvesoftware.Steam"
}
options {
......@@ -62,7 +63,7 @@ pipeline {
git config --global user.name Jenkins
git config --global user.email nobody@example.com
'''
checkoutCollaboraGitlab('smcv/flatdeb', 'wip/ci', 'src')
checkoutCollaboraGitlab('smcv/flatdeb-steam', 'wip/ci', 'src')
sh '''
set -e
export LD_PRELOAD=libnss_wrapper.so
......@@ -74,6 +75,8 @@ pipeline {
go get -v -x github.com/go-debos/debos/cmd/debos
go install -v -x github.com/go-debos/debos/cmd/debos
( cd src; git submodule update --init --recursive )
'''
}
}
......@@ -86,7 +89,7 @@ pipeline {
cd src
for suite in $suites; do
for arch in $archs; do
./run.py --suite "$suite" --arch "$arch" base
flatdeb/run.py --suite "$suite" --arch "$arch" base
done
done
ls -sh "$XDG_CACHE_HOME/flatdeb"
......@@ -104,7 +107,7 @@ pipeline {
for suite in $suites; do
for arch in $archs; do
for rt in $runtimes; do
./run.py --suite "$suite" --arch "$arch" runtimes "runtimes/net.debian.flatpak.$rt.yaml"
flatdeb/run.py --suite "$suite" --arch "$arch" runtimes "runtimes/$rt.yaml"
done
done
done
......
#!/usr/bin/python3
# Compare Steam Runtime with official package list
#
# Copyright © 2017 Collabora Ltd.
#
# SPDX-License-Identifier: MIT
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
import argparse
import os
from debian.debian_support import Version
import yaml
def main(packages, *, manifest=None, steam=None):
with open('runtimes/com.valvesoftware.SteamRuntime.yaml') as reader:
source_manifest = yaml.safe_load(reader)
print('---')
missing_platform = set()
missing_sdk = set()
only_in_flatpak = set()
only_in_steam = set()
newer_in_flatpak = set()
newer_in_steam = set()
if packages is not None:
print('comparing_packages_txt:')
print(' path: ' + packages)
with open(packages, 'r') as reader:
for line in reader:
line = line.strip()
if not line or line.startswith('#'):
continue
tokens = line.split()
source = tokens[0]
binaries = tokens[1:]
for binary in binaries:
if (binary.endswith('-dev') or
binary.endswith('-multidev') or
binary.endswith('-dbg') or
# Probably not intentionally in the user-facing
# Runtime?
# https://github.com/ValveSoftware/steam-runtime/issues/76
binary.endswith('-pic') or
# Probably not intentionally in the user-facing
# Runtime?
# https://github.com/ValveSoftware/steam-runtime/issues/77
binary == 'nvidia-cg-toolkit'):
if binary in source_manifest['sdk'].get(
'add_packages_multiarch', ()):
continue
if binary in source_manifest['sdk']['add_packages']:
continue
missing_sdk.add(binary)
continue
if binary in source_manifest['add_packages_multiarch']:
continue
if binary in source_manifest['add_packages']:
continue
missing_platform.add(binary)
if missing_platform:
print(' missing_from_platform:')
for binary in sorted(missing_platform):
print(' - ' + binary)
if missing_sdk:
print(' missing_from_sdk:')
for binary in sorted(missing_sdk):
print(' - ' + binary)
if steam is None:
steam = os.path.join(os.path.expanduser('~'), '.steam', 'steam')
if not os.path.exists(steam):
steam = None
steam_runtime = os.path.join(steam, 'ubuntu12_32', 'steam-runtime')
if not os.path.exists(steam_runtime):
steam_runtime = None
if steam_runtime is not None and manifest is not None:
print('comparing_steam_installation:')
print(' steam: ' + steam_runtime)
print(' manifest: ' + manifest)
records = []
with open(manifest, 'r') as reader:
for line in reader:
if line.strip().startswith('#'):
continue
if not line.strip():
continue
records.append(line.split('\t'))
architectures = set()
flatpak_versions = {}
for line in records:
if line[0].startswith('coreutils:'):
arch = line[0].split(':', 1)[1]
architectures.add(arch)
elif line[0].startswith('libc6:'):
arch = line[0].split(':', 1)[1]
architectures.add(arch)
flatpak_versions[line[0].split(':', 1)[0]] = line
in_steam = set()
only_in_flatpak = set()
sources_only_in_flatpak = set()
for arch in architectures:
contents = os.listdir(
os.path.join(steam_runtime, arch, 'installed'))
for name in contents:
if name in ('.', '..'):
continue
if name.endswith('.md5'):
continue
binary, version, arch_ = name.split('_', 2)
assert arch_ in (arch, 'all'), (arch, name)
in_steam.add(binary)
flatpak_version = flatpak_versions.get(binary)
if flatpak_version is None:
only_in_steam.add(binary)
else:
no_epoch_version = Version(flatpak_version[1])
no_epoch_version.epoch = None
if no_epoch_version < Version(version):
newer_in_steam.add(
(binary, flatpak_version[1], version, arch))
if no_epoch_version > Version(version):
newer_in_flatpak.add(
(binary, flatpak_version[1], version, arch))
for package, line in flatpak_versions.items():
if package not in in_steam:
source = line[2] or package
if '(' in source:
source_version = source.split('(', 1)[1].strip(')')
else:
source_version = line[1]
only_in_flatpak.add(package)
sources_only_in_flatpak.add((source, source_version))
if only_in_steam:
print(' only_in_steam:')
for binary in sorted(only_in_steam):
print(' - ' + binary)
if only_in_flatpak:
print(' only_in_flatpak:')
for binary in sorted(only_in_flatpak):
print(' - ' + binary)
if sources_only_in_flatpak:
print(' sources_only_in_flatpak:')
for source in sorted(sources_only_in_flatpak):
print(' - source: ' + source[0])
print(' source_version: ' + source[1])
if newer_in_flatpak:
print(' newer_in_flatpak:')
for binary in sorted(newer_in_flatpak):
print(' - package: ' + binary[0])
print(' in_flatpak: ' + binary[1])
print(' in_steam: ' + binary[2])
print(' architecture: ' + binary[3])
if newer_in_steam:
print(' newer_in_steam:')
for binary in sorted(newer_in_steam):
print(' - package: ' + binary[0])
print(' in_flatpak: ' + binary[1])
print(' in_steam: ' + binary[2])
print(' architecture: ' + binary[3])
print('...')
if (missing_platform or missing_sdk or only_in_steam or
newer_in_flatpak or newer_in_steam):
raise SystemExit(1)
if __name__ == '__main__':
parser = argparse.ArgumentParser(
description='Compare Steam Runtime with official package list')
parser.add_argument(
'--steam', metavar='STEAM',
help='Path to ~/.steam/steam or ~/.local/share/Steam',
)
parser.add_argument(
'--manifest', metavar='MANIFEST',
help='Path to '
'~/.local/share/flatpak/runtime/'
'com.valvesoftware.SteamRuntime.Platform/'
'x86_64/scout_beta/active/files/manifest.dpkg or similar',
)
parser.add_argument(
'packages', metavar='PACKAGES.TXT',
help='Path to packages.txt from the Steam Runtime',
)
args = parser.parse_args()
main(args.packages, manifest=args.manifest, steam=args.steam)
/.flatpak-builder/
__pycache__/
flatdeb
=======
flatdeb is a proof of concept for building Flatpak runtimes and apps
from Debian packages.
Walkthrough
-----------
On a Debian 9 VM:
sensible-editor /etc/apt/sources.list # and enable backports
apt install debootstrap systemd-container time
apt install python3 python3-debian python3-gi python3-yaml
apt install -t stretch-backports flatpak flatpak-builder ostree
(Or install on Debian testing/unstable.)
Also install the latest versions of
[fakemachine](https://github.com/go-debos/fakemachine)
and [debos](https://github.com/go-debos/debos).
Also edit org.debian.packages.openarena.yaml to specify where you have
put local clones of ioquake3 and openarena if you can't (or don't
want to) clone them via https.
You will probably want to use a caching proxy such as apt-cacher-ng to
download `.deb` packages, which you can do by prefixing all the commands
below with `env http_proxy=http://192.168.122.1:3142` or similar.
Finally, put a copy of debian-archive-keyring.gpg in this directory.
Then you can run:
./run.py --suite=stretch --arch=amd64 base
./run.py --suite=stretch --arch=amd64 runtimes \
runtimes/net.debian.flatpak.Base.yaml
./run.py --suite=stretch --arch=amd64 runtimes \
runtimes/net.debian.flatpak.Games.yaml
./run.py --suite=stretch --arch=amd64 app \
apps/org.debian.packages.hello.yaml
./run.py --suite=stretch --arch=amd64 app \
apps/org.debian.packages.openarena.yaml
./run.py --suite=stretch --arch=amd64 app \
apps/org.debian.packages.mesa_utils.yaml
On the same machine, or a test machine onto which you have copied
`$HOME/.cache/flatdeb/repo` with `rsync` or similar:
flatpak --user remote-add --no-gpg-verify flatdeb $HOME/.cache/flatdeb/repo
flatpak --user install flatdeb org.debian.packages.hello
flatpak run org.debian.packages.hello
flatpak --user install flatdeb org.debian.packages.openarena
flatpak run org.debian.packages.openarena
Bonus content: Steam as a Flatpak, with multiarch
-------------------------------------------------
https://github.com/smcv/flatdeb-steam
---
id: org.debian.packages.mesa_utils
branch: master
runtime: net.debian.flatpak.Games.Platform
sdk: net.debian.flatpak.Games.Sdk
command: glxgears
finish-args:
- --share=ipc
- --socket=x11
- --device=dri
modules:
- name: mesa-utils
x-flatdeb-apt-packages:
- mesa-utils
sources:
- type: file
path: deb-buildapi/configure
- type: file
path: deb-buildapi/Makefile
...
#!/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/>.
*/
@Library('steamos-ci') _
pipeline {
agent {
docker {
label 'docker-slave'
args '--device=/dev/kvm'
image "docker-registry.internal.collabora.com/steamos/package-builder:stretch"
registryUrl 'https://docker-registry.internal.collabora.com'
registryCredentialsId 'ccu-docker-internal-collabora-com'
alwaysPull true
}
}
environment {
GOBIN="${env.WORKSPACE}/bin"
GOPATH="${env.WORKSPACE}/go"
HOME="${env.WORKSPACE}"
NSS_WRAPPER_PASSWD="${env.WORKSPACE}/passwd"
NSS_WRAPPER_GROUP="/dev/null"
PATH="${env.WORKSPACE}/bin:/usr/local/bin:/usr/bin:/bin"
PYTHONUNBUFFERED="1"
TMPDIR="${env.WORKSPACE}"
XDG_CACHE_HOME="${env.WORKSPACE}/cache"
suites="stretch"
archs="amd64 i386"
runtimes="Base Games"
}
options {
timestamps()
skipDefaultCheckout()
}
stages {
stage ("setup") {
steps {
sh '''
set -e
echo "jenkins::$(id -u):$(id -g):Jenkins:$(pwd):/bin/sh" > passwd
mkdir -p "$XDG_CACHE_HOME"
git config --global user.name Jenkins
git config --global user.email nobody@example.com
'''
checkoutCollaboraGitlab('smcv/flatdeb', 'wip/ci', 'src')
sh '''
set -e
export LD_PRELOAD=libnss_wrapper.so
mkdir -p "$HOME/go"
go get -v -x github.com/go-debos/fakemachine/cmd/fakemachine
go install -v -x github.com/go-debos/fakemachine/cmd/fakemachine
go get -v -x github.com/go-debos/debos/cmd/debos
go install -v -x github.com/go-debos/debos/cmd/debos
'''
}
}
stage ("base") {
steps {
sh '''
set -e
export LD_PRELOAD=libnss_wrapper.so
cd src
for suite in $suites; do
for arch in $archs; do
./run.py --suite "$suite" --arch "$arch" base
done
done
ls -sh "$XDG_CACHE_HOME/flatdeb"
ostree refs --repo "$XDG_CACHE_HOME"/flatdeb/repo|LC_ALL=C sort -u
'''
}
}
stage ("runtimes") {
steps {
sh '''
set -e
export LD_PRELOAD=libnss_wrapper.so
cd src
for suite in $suites; do
for arch in $archs; do
for rt in $runtimes; do
./run.py --suite "$suite" --arch "$arch" runtimes "runtimes/net.debian.flatpak.$rt.yaml"
done
done
done
ls -sh "$XDG_CACHE_HOME/flatdeb"
ostree refs --repo "$XDG_CACHE_HOME"/flatdeb/repo|LC_ALL=C sort -u
'''
}
}
}
post {
always {
deleteDir()
}
}
}
/* vim:set sw=2 sts=2 et: */
#!/bin/sh
# Copyright © 2016-2018 Simon McVittie
# Copyright © 2018 Collabora Ltd.
#
# SPDX-License-Identifier: MIT
set -e
set -u
export MYPYPATH="${PYTHONPATH:=$(pwd)}"
i=0
for script in \
./*.py \
flatdeb/apt-install \
flatdeb/collect-source-code \
flatdeb/purge-conffiles \
; do
i=$((i + 1))
if [ "x${MYPY:="$(command -v mypy || echo false)"}" = xfalse ]; then
echo "ok $i - $script # SKIP mypy not found"
elif "${MYPY}" \
--python-executable="${PYTHON:=python3}" \
--follow-imports=skip \
--ignore-missing-imports \
"$script"; then
echo "ok $i - $script"
else
echo "not ok $i - $script # TODO mypy issues reported"
fi
done
echo "1..$i"
# vim:set sw=4 sts=4 et:
#!/bin/sh
# Copyright © 2016-2018 Simon McVittie
# Copyright © 2018 Collabora Ltd.
#
# SPDX-License-Identifier: MIT
set -e
set -u
if [ "x${PYCODESTYLE:=pycodestyle}" = xfalse ] || \
[ -z "$(command -v "$PYCODESTYLE")" ]; then
echo "1..0 # SKIP pycodestyle not found"
elif "${PYCODESTYLE}" \
./*.py \
flatdeb/apt-install \
flatdeb/collect-source-code \
flatdeb/purge-conffiles \
>&2; then
echo "1..1"
echo "ok 1 - $PYCODESTYLE reported no issues"
else
echo "1..1"
echo "not ok 1 # TODO $PYCODESTYLE issues reported"
fi
# vim:set sw=4 sts=4 et:
#!/bin/sh
# Copyright © 2016-2018 Simon McVittie
# Copyright © 2018 Collabora Ltd.
#
# SPDX-License-Identifier: MIT
set -e
set -u
if [ "x${PYFLAKES:=pyflakes3}" = xfalse ] || \
[ -z "$(command -v "$PYFLAKES")" ]; then
echo "1..0 # SKIP pyflakes3 not found"
elif "${PYFLAKES}" \
./*.py \
flatdeb/apt-install \
flatdeb/collect-source-code \
flatdeb/purge-conffiles \
>&2; then
echo "1..1"
echo "ok 1 - $PYFLAKES reported no issues"
else
echo "1..1"
echo "not ok 1 # TODO $PYFLAKES issues reported"
fi
# vim:set sw=4 sts=4 et:
---
# Copyright © 2013-2016 Valve Corporation
# Copyright © 2017-2019 Collabora Ltd.
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of these scripts and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
id_prefix: com.valvesoftware.SteamRuntime
add_packages:
- steamrt-container
- steamrt-libs
post_script: |
install -d -m755 /usr/lib/locale
install -d -m755 /usr/share/i18n
platform:
null: null
sdk:
add_packages_multiarch:
- steamrt-libdevel
add_packages:
- steamrt-dev
- steamrt-libdebug
- steamrt-libdebug-non-multiarch
- steamrt-libdevel-non-multiarch
post_script: |
ln -sv busybox /usr/bin/dos2unix
ln -sv busybox /usr/bin/ifconfig
ln -sv busybox /usr/bin/ip
ln -sv busybox /usr/bin/nc
ln -sv busybox /usr/bin/ping
ln -sv busybox /usr/bin/ping6
ln -sv busybox /usr/bin/route
ln -sv busybox /usr/bin/telnet
ln -sv busybox /usr/bin/traceroute
ln -sv busybox /usr/bin/traceroute6
ln -sv busybox /usr/bin/unix2dos
ln -sv busybox /usr/bin/vi
for bin in \
clang \
clang++ \
; do
ln -fnsv "/usr/lib/llvm-4.0/bin/$bin" /usr/bin
done
for bin in \
asan_symbolize \
; do
ln -fnsv "${bin}-4.0" "/usr/bin/${bin}"
done
arch="$(dpkg --print-architecture)"
update-alternatives --set java "/usr/lib/jvm/java-8-openjdk-$arch/jre/bin/java"
update-alternatives --set jexec "/usr/lib/jvm/java-8-openjdk-$arch/jre/lib/jexec"
update-alternatives --set jjs "/usr/lib/jvm/java-8-openjdk-$arch/jre/bin/jjs"
update-alternatives --set keytool "/usr/lib/jvm/java-8-openjdk-$arch/jre/bin/keytool"
update-alternatives --set orbd "/usr/lib/jvm/java-8-openjdk-$arch/jre/bin/orbd"
update-alternatives --set pack200 "/usr/lib/jvm/java-8-openjdk-$arch/jre/bin/pack200"
update-alternatives --set policytool "/usr/lib/jvm/java-8-openjdk-$arch/jre/bin/policytool"
update-alternatives --set rmid "/usr/lib/jvm/java-8-openjdk-$arch/jre/bin/rmid"
update-alternatives --set rmiregistry "/usr/lib/jvm/java-8-openjdk-$arch/jre/bin/rmiregistry"
update-alternatives --set servertool "/usr/lib/jvm/java-8-openjdk-$arch/jre/bin/servertool"
update-alternatives --set tnameserv "/usr/lib/jvm/java-8-openjdk-$arch/jre/bin/tnameserv"
update-alternatives --set unpack200 "/usr/lib/jvm/java-8-openjdk-$arch/jre/bin/unpack200"
if [ -e /usr/lib/dbus-1.0/dbus-daemon-launch-helper ]; then
chmod --changes 0644 /usr/lib/dbus-1.0/dbus-daemon-launch-helper
chown --changes root:root /usr/lib/dbus-1.0/dbus-daemon-launch-helper
fi
...
---
# Loosely based on:
# https://github.com/ValveSoftware/steam-runtime/blob/master/setup_chroot.sh
#
# Copyright © 2013-2016 Valve Corporation
# Copyright © 2017-2019 Collabora Ltd.
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of these scripts and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
id_prefix: com.valvesoftware.SteamRuntime
add_packages_multiarch:
- steamrt-libs
add_packages:
- steamrt-container
post_script: |
ln -s /usr/libexec/flatpak-xdg-utils/xdg-email /usr/bin/
ln -s /usr/libexec/flatpak-xdg-utils/xdg-open /usr/bin/
install -d -m755 /usr/lib/locale
install -d -m755 /usr/share/i18n
platform:
null: null
sdk:
add_packages_multiarch:
- steamrt-libdebug
- steamrt-libdevel
add_packages:
- steamrt-dev
- steamrt-libdebug-non-multiarch
- steamrt-libdevel-non-multiarch
post_script: |
ln -sv busybox /usr/bin/dos2unix
ln -sv busybox /usr/bin/ifconfig
ln -sv busybox /usr/bin/ip
ln -sv busybox /usr/bin/nc
ln -sv busybox /usr/bin/ping
ln -sv busybox /usr/bin/ping6
ln -sv busybox /usr/bin/route
ln -sv busybox /usr/bin/telnet
ln -sv busybox /usr/bin/traceroute
ln -sv busybox /usr/bin/traceroute6
ln -sv busybox /usr/bin/unix2dos
ln -sv busybox /usr/bin/vi
# Workaround bug 714890 in 32-bit clang. Gcc 4.8 changed the include paths.
# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=714890
# /usr/include/c++/4.6/i686-linux-gnu/bits/c++config.h
# /usr/include/i386-linux-gnu/c++/4.8/bits/c++config.h
echo "Before fixing include paths:"
ls -ld /usr/include/c++/*/*-linux-gnu
ls -ld /usr/include/*-linux-gnu/c++/*
if [ -d /usr/include/i386-linux-gnu/c++/4.8 ]; then
ln -s /usr/include/i386-linux-gnu/c++/4.8 /usr/include/c++/4.8/i686-linux-gnu
fi
echo "After fixing include paths:"
ls -ld /usr/include/c++/*/*-linux-gnu
ls -ld /usr/include/*-linux-gnu/c++/*
# Setup compiler alternatives
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 50
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.6 50
update-alternatives --install /usr/bin/cpp cpp-bin /usr/bin/cpp-4.6 50
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 100
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 100
update-alternatives --install /usr/bin/cpp cpp-bin /usr/bin/cpp-4.8 100
update-alternatives --install /usr/bin/gcc gcc /usr/bin/clang-3.4 50
update-alternatives --install /usr/bin/g++ g++ /usr/bin/clang++-3.4 50
update-alternatives --install /usr/bin/gcc gcc /usr/bin/clang-3.6 50
update-alternatives --install /usr/bin/g++ g++ /usr/bin/clang++-3.6 50
# gcc-4.8 is the default
update-alternatives --set gcc /usr/bin/gcc-4.8
update-alternatives --set g++ /usr/bin/g++-4.8
update-alternatives --set cpp-bin /usr/bin/cpp-4.8
add-extensions:
# FIXME: This is not properly multiarch-aware, but it's enough for a
# proof of concept.
com.valvesoftware.SteamRuntime.GL:
directory: lib/GL
subdirectories: true
no-autodownload: true
autodelete: false
add-ld-path: lib
download-if: active-gl-driver
enable-if: active-gl-driver
merge-dirs: vulkan/icd.d;glvnd/egl_vendor.d
# FIXME: Ideally this should only be added for 64-bit architectures
com.valvesoftware.SteamRuntime.GL32:
directory: lib/GL32
subdirectories: true
no-autodownload: true
autodelete: false
add-ld-path: lib
download-if: active-gl-driver
enable-if: active-gl-driver
merge-dirs: vulkan/icd.d;glvnd/egl_vendor.d
...
---
# Copyright © 2013-2016 Valve Corporation
# Copyright © 2017-2019 Collabora Ltd.
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of these scripts and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
id_prefix: com.valvesoftware.SteamRuntime
add_packages_multiarch:
- steamrt-libs
add_packages:
- steamrt-container
post_script: |
ln -s /usr/libexec/flatpak-xdg-utils/xdg-email /usr/bin/
ln -s /usr/libexec/flatpak-xdg-utils/xdg-open /usr/bin/
install -d -m755 /usr/lib/locale
install -d -m755 /usr/share/i18n
platform:
null: null
sdk:
add_packages_multiarch:
- steamrt-libdebug
- steamrt-libdevel
add_packages:
- steamrt-dev
- steamrt-libdebug-non-multiarch
post_script: |
ln -sv busybox /usr/bin/dos2unix
ln -sv busybox /usr/bin/ifconfig
ln -sv busybox /usr/bin/ip
ln -sv busybox /usr/bin/nc
ln -sv busybox /usr/bin/ping
ln -sv busybox /usr/bin/ping6
ln -sv busybox /usr/bin/route
ln -sv busybox /usr/bin/telnet
ln -sv busybox /usr/bin/traceroute
ln -sv busybox /usr/bin/traceroute6
ln -sv busybox /usr/bin/unix2dos
ln -sv busybox /usr/bin/vi
ln -sv busybox /usr/bin/xxd
...
---
apt_components:
- main
can_merge_usr: true
strip_source_version_suffix: '\+srthb.*'
sources:
- label: debian
apt_uri: 'http://deb.debian.org/debian'
apt_suite: 'jessie'
keyring: 'debian-archive-keyring.gpg'
- label: security
apt_uri: 'http://security.debian.org'
apt_suite: 'jessie/updates'
# Not available to the public yet, so this URL is just a guess.
- label: steamrt
apt_uri: 'http://repo.steampowered.com/steamrt-heavy'
keyring: 'valve-archive-keyring.gpg'
...
---
apt_components:
- main
debootstrap_script: 'precise'
# """
# A copy of the C library was found in an unexpected directory:
# '/usr/lib/x86_64-linux-gnu/libc-2.15.so'
# It is not safe to upgrade the C library in this situation;
# please remove that copy of the C library or get it out of
# '/usr/lib/x86_64-linux-gnu' and try again.
# """
can_merge_usr: after_debootstrap
strip_source_version_suffix: '\+srt[0-9]+'
sources:
- label: steamrt
apt_uri: 'http://repo.steampowered.com/steamrt'
keyring: 'valve-archive-keyring.gpg'
apt_components:
- main
- label: steamrt-debug
apt_uri: 'http://repo.steampowered.com/steamrt'
keyring: 'valve-archive-keyring.gpg'
apt_components:
- main/debug
deb: true
deb-src: false
- label: steam
for_build: false
for_final: true
apt_uri: 'http://repo.steampowered.com/steam'
apt_suite: 'precise'
keyring: 'valve-steam-keyring.gpg'
apt_components:
- steam
- label: ubuntu
for_build: false
for_final: true
apt_uri: 'http://archive.ubuntu.com/ubuntu'
apt_suite: 'precise'
keyring: 'ubuntu-archive-keyring.gpg'
apt_components:
- main
- restricted
- universe
- multiverse
scout.yaml
\ No newline at end of file
---
apt_components:
- main
- non-free
can_merge_usr: true
strip_source_version_suffix: '\+srtv2.*'
sources:
# Not available to the public yet, so this URL is just a guess.
- label: steamrt
apt_uri: 'http://repo.steampowered.com/steamrt-spy'
keyring: 'valve-archive-keyring.gpg'
- label: ubuntu
for_build: false
for_final: true
apt_uri: 'http://archive.ubuntu.com/ubuntu'
apt_suite: 'bionic'
keyring: 'ubuntu-archive-keyring.gpg'
apt_components:
- main
- restricted
- universe
- multiverse
......@@ -11,10 +11,7 @@ export MYPYPATH="${PYTHONPATH:=$(pwd)}"
i=0
for script in \
./*.py \
flatdeb/apt-install \
flatdeb/collect-source-code \
flatdeb/purge-conffiles \
*.py \
; do
i=$((i + 1))
if [ "x${MYPY:="$(command -v mypy || echo false)"}" = xfalse ]; then
......@@ -23,7 +20,7 @@ for script in \
--python-executable="${PYTHON:=python3}" \
--follow-imports=skip \
--ignore-missing-imports \
"$script"; then
$script; then
echo "ok $i - $script"
else
echo "not ok $i - $script # TODO mypy issues reported"
......
......@@ -11,10 +11,7 @@ if [ "x${PYCODESTYLE:=pycodestyle}" = xfalse ] || \
[ -z "$(command -v "$PYCODESTYLE")" ]; then
echo "1..0 # SKIP pycodestyle not found"
elif "${PYCODESTYLE}" \
./*.py \
flatdeb/apt-install \
flatdeb/collect-source-code \
flatdeb/purge-conffiles \
*.py \
>&2; then
echo "1..1"
echo "ok 1 - $PYCODESTYLE reported no issues"
......
......@@ -11,10 +11,7 @@ if [ "x${PYFLAKES:=pyflakes3}" = xfalse ] || \
[ -z "$(command -v "$PYFLAKES")" ]; then
echo "1..0 # SKIP pyflakes3 not found"
elif "${PYFLAKES}" \
./*.py \
flatdeb/apt-install \
flatdeb/collect-source-code \
flatdeb/purge-conffiles \
*.py \
>&2; then
echo "1..1"
echo "ok 1 - $PYFLAKES reported no issues"
......