Skip to content
Snippets Groups Projects
flatdeb - Steam
===============

flatdeb is a proof of concept for building Flatpak runtimes and apps
from Debian packages. This repository sets it up for Steam.

Walkthrough
-----------

On a Debian 10 'buster' machine:

    apt install \
    binutils \
    debootstrap \
    debos \
    flatpak \
    flatpak-builder \
    ostree \
    pigz \
    python3 \
    python3-debian \
    python3-gi \
    python3-yaml \
    systemd-container \
    time \
    ${NULL}

(Or use Debian 9 'stretch' and get flatpak, flatpak-builder and ostree
from stretch-backports, and install
[fakemachine](https://github.com/go-debos/fakemachine)
and [debos](https://github.com/go-debos/debos) from upstream source code.)

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 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:

    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

Depending on the current state of the Steam Runtime development cycle,
the `scout` runtime as configured here might require unreleased packages;
roll back recent commits if necessary.

The `heavy` and `spy` alternative runtimes are under development and the
apt sources necessary to build them are not currently public.

The "app" stage (which builds Flatpak apps) is not regularly tested but
hopefully still works:

    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 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.mesa_utils
    flatpak run org.debian.packages.mesa_utils
    flatpak --user install flatdeb com.valvesoftware.Steam
    flatpak run com.valvesoftware.Steam

Note that the Steam Flatpak app that is built this way is very much a
proof-of-concept, and does not have all the necessary permissions and
workarounds for the Steam client and games to work particularly reliably. The
[community Steam package on Flathub](https://github.com/flathub/com.valvesoftware.Steam)
is likely to work better in practice.