Flatpak. Apps on the Linux desktop. Alexander Larsson Red Hat

Similar documents
Contain your Desktop Applications with Flatpak

Flatpak a technical walk-through. Alexander Larsson, Red Hat

How to make your application into a Flatpak

Flatpak workshop. flatpak.org

Flatpak Documentation

Flatpak Documentation. Flatpak Team

Why and How I Switched to Flatpak for App Distribution and Development in Sandbox

The Future of Linux Application Distribution

Flatpak and your distribution. Simon McVittie

Adding Applications to the GNOME Software Center

The ultimate guide to software updates on embedded Linux devices

Managing build infrastructure of a Debian derivative

UNIT 9 Introduction to Linux and Ubuntu

Linux desktop app guide Documentation. Thomas Kluyver & contributors

How we added software updates to AGL

IOL INTACT Installation Guide

Secure and Simple Sandboxing in SELinux

Pulp OSTree Documentation

EECS Software Tools. Lab 2 Tutorial: Introduction to UNIX/Linux. Tilemachos Pechlivanoglou

Introduction of Linux

Salesforce DX Setup Guide

Salesforce DX Setup Guide

Contents in Detail. Foreword by Xavier Noria

CS197U: A Hands on Introduction to Unix

Carlos Soriano Sanchez. Bastian Ilsø Hougaard. csoriano bastianilso

Travis Cardwell Technical Meeting

Manage Directories and Files in Linux. Objectives. Understand the Filesystem Hierarchy Standard (FHS)

Android System Development Training 4-day session

Running Classic Applications in a Confined Ecosystem. Larry Price

Singularity CRI User Documentation

Cross platform enablement for the yocto project with containers. ELC 2017 Randy Witt Intel Open Source Technology Center

RED HAT DEVELOPER TOOLSET Build, Run, & Analyze Applications On Multiple Versions of Red Hat Enterprise Linux

Docker Security. Mika Vatanen

Index. D, E Damn Vulnerable ios application (DVIA), Data Execution Prevention (DEP), 3 Data storage security,

Zero Install. Decentralised cross-platform package management

ULTEO OPEN VIRTUAL DESKTOP OPENSUSE 11.3 SUPPORT

RHEL Packaging. (making life easier with RPM) Jindr ich Novy Ph.D., June 26, 2012

Portal Administrator Guide 1 June 2014

AppImageKit Documentation

Working with Ubuntu Linux. Track 2 Workshop June 2010 Pago Pago, American Samoa

Real-Time Monitoring Configuration

Manually Mount Usb Flash Drive Linux Command Line Redhat

Building Applications with IOx

LINUX FUNDAMENTALS (5 Day)

Server Monitoring. AppDynamics Pro Documentation. Version 4.1.x. Page 1

RED HAT DEVELOPER TOOLSET: Build, Run, & Analyze Applications On Multiple Versions of Red Hat Enterprise Linux

AdventNet ManageEngine OpManager Installation Guide. Table Of Contents INTRODUCTION... 2 INSTALLING OPMANAGER Windows Installation...

ISLET: Jon Schipp, AIDE jonschipp.com. An Attempt to Improve Linux-based Software Training

Allowing Users to Run Services at the OLCF with Kubernetes

Android Sdk Install Documentation Eclipse. Ubuntu >>>CLICK HERE<<<

The student will have the essential skills needed to be proficient at the Unix or Linux command line.

Linux. An introduction. Aurélien Villani 01/2018

DCLI User's Guide. Data Center Command-Line Interface 2.7.0

Question and Answer U3A in Bath. Question and Answer. There were several questions this month, each given a section below.

Ubuntu Install Partition Server On. Virtualbox 4.2 >>>CLICK HERE<<<

Linux for Beginners. Windows users should download putty or bitvise:

@briandorsey #kubernetes #GOTOber

Linux Fundamentals (L-120)

Web AppBuilder for ArcGIS: A Deep Dive in Enterprise Deployments. Nick Brueggemann and Mark Torrey

How to build and run OCI containers

GUI Programming with GTK+

Application Management

Dockerfile Best Practices

Question No: 1 In which file should customization classes be specified in the cust-config section (under mds-config)?

Manually Mount Usb Flash Drive Linux Command Line Fedora

SymmetricDS Pro 3.0 Quick Start Guide

Software Tools Subversion

Xcalar Installation Guide

Laboratory of Networked Embedded Systems

10ZiG Technology. Thin Desktop Quick Start Guide

Singularity: Containers for High-Performance Computing. Grigory Shamov Nov 21, 2017

Filesystem Hierarchy and Permissions

NGFW Security Management Center

Uninstalling And Manually Install Vmware Tools Ubuntu Guest

How To Manually Install Software In Linux Mint 14 Cinnamon Edition

Learn Linux in a Month of Lunches by Steven Ovadia

Display Modules (DL-DM) Application Developer's Guide

Docker Deep Dive. Daniel Klopp

Azure Sphere: Fitting Linux Security in 4 MiB of RAM. Ryan Fairfax Principal Software Engineering Lead Microsoft

Building Android Apps Runtime SDK for Android

The WebGUI Runtime Environment. Roy Johnson Plain Black Corporation

Software Development I

A Practical Introduction to Version Control Systems

A New Model for Image Distribution

Lightweight virtualization with GoboLinux Runner

Installation and Configuration Guide Simba Technologies Inc.

ArcGIS Enterprise: Architecture & Deployment. Anthony Myers

Downloading and installing Db2 Developer Community Edition on Red Hat Enterprise Linux Roger E. Sanders Yujing Ke Published on October 24, 2018

Data Store Management Best Practices. Bill Major Laurence Clinton

Installing and Configuring Cisco Unified Real-Time Monitoring Tool

Docker for HPC? Yes, Singularity! Josef Hrabal

X11, X12, What next. And its companion: the ROOT GUI

Kivy Designer Documentation

NSIGHT ECLIPSE EDITION

Docker and Security. September 28, 2017 VASCAN Michael Irwin

The same command line options are available on our per-machine installs as well.

Hurd s PCI arbiter. Samuel Thibault & Joan Lledo February 3rd

DCLI User's Guide. Data Center Command-Line Interface 2.9.1

Session ID vsphere Client Plug-ins. Nimish Sheth Manas Kelshikar

MesosCon Qian Zhang (IBM China), Jie Yu (Mesosphere) OCI Support in Mesos Mesosphere, Inc. All Rights Reserved. 1

Transcription:

Flatpak Apps on the Linux desktop Alexander Larsson Red Hat

Flatpak Major Goals Cross-distro deployment and distribution Sandboxing applications Shorter distance between developers and users

Using Flatpak

Using Flatpak (cont)

Using Flatpak (cont)

Command line $ flatpak remote-add gnome \ https://sdk.gnome.org/gnome.flatpakrepo $ flatpak remote-add gnome-apps \ https://sdk.gnome.org/gnome-apps.flatpakrepo $ flatpak install gnome-apps org.gnome.maps $ flatpak run org.gnome.maps $ flatpak update org.gnome.maps Alt: $ flatpak install \ https://sdk.gnome.org/gnome-maps.flatpakref

How did this work? OSTree repo on web server Very similar to git One branch per app One branch with metadata (AppStream) for all branches

Installation Pull application branch to local repo Check out the result to a regular directory Extract exports from the app to a global directory:.desktop files Icons DBus service files This is how the app integrates with the desktop

OSTree Advantages Deduplication On disk In filesystem cache Checkouts are hardlinked Atomic updates On disk While running

Example application Files: metadata files/ bin/hello-world lib/libbundled.so.1 share/helloworld/hello.txt export/ share/applications/com.example.helloworld.desktop share/dbus-1/services/com.example.helloworld.service share/icons/hicolor/48x48/apps/com.example.helloworld.png Metadata: [Application] name=com.example.helloworld command=hello-world runtime=com.example.platform/x86_64/1.0

Running Application runs in a contained environment Uses bubblewrap Application files are always in /app No need for relocation, just build application with./configure --prefix=/app Runtime in /usr Files are readonly App can access ~/.var/app/$appid/

What is a runtime? Like a minimal distribution Only app dependencies An application specifies the runtime to use Multiple runtimes can be used in parallel

Example Minimal Runtime Files: metadata files/ bin/bash etc/ld.so.conf lib ld-linux.so.2 libc.so.6 libdl.so.6 Metadata: [Runtime] name=com.example.platform/x86_64/1.0 May also contain shared data like: Locales, Fonts, icons

What is in a runtime? libc Basic library dependencies Basic unix tools Security update critical modules

What is a runtime not? Another name for packages Something most people should create A way to avoid bundling dependencies

How do I chose a runtime? Depends on your application Generally Smaller runtime Longer supported lifespan May need to bundle more Larger runtime Shorter supported lifespan Need to bundle less Freedesktop.org runtime Gnome/KDE runtime Re-packaging distro packages: Fedora, Debian, etc Allows making flatpaks from existing app packages

Sandboxing Protect users data from apps Protect apps from each others Require less trust from app source Don t run arbitrary code as root Atomic, easily uninstalled apps Don't make machine a botnet node, spam sender, bitcoin miner, etc

Container technologies Namespaces Limited filesystem visiblity PR_SET_NO_NEW_PRIVS Seccomp (Optional) cgroups

So, how does an app actually do something?

Optionally disable limits Network namespace IPC namespace DRI device nodes File access (all or partial) Grant access to host services X11 Wayland PulseAudio Filtered DBus

What is a portal Service running in the session Typically accessed via dbus Designed to be safely accessed from sandbox Safe due to user interaction App permission checks Extends what a sandboxed app can do

Current portals Document portal Desktop portal File chooser Show URI Print HTTP Proxy config Network status Backends: Gtk+, KDE

Building flatpaks Two approaches Pre-existing contents Build in Flatpak with SDKs flatpak build

Flatpak-builder Layered above the lowlevel commands Json manifest describing build steps Nice features Source downloading and verification Build cache Runs with limited fs access, no network access, etc Repeatable build paths (/run/build) Creates debug-info and locale extensions Built-in ccache support

Example manifest { "id": "org.gnome.characters", "runtime": "org.gnome.platform", "runtime-version": "3.22", "sdk": "org.gnome.sdk", "finish-args": [ "--socket=x11" ], "cleanup": ["/include", "*.a" ], "modules": [ ] }

{ "name": "gnome-desktop", "config-opts": ["--disable-debug-tools", "--disable-udev"], "cleanup": ["/bin" ], "sources": [ { "type": "archive", "url": "https://download.gnome.org/.../gnome-desktop-3.22.0.tar.xz", "sha256": "cff36ccd8d0a62177a4c1513ec70d13ead3b84fdc208ba54199cf7616f05644d" } ] }, { "name": "gnome-characters", "sources": [ { "type": "archive", "url": "https://download.gnome.org/.../gnome-characters-3.22.0.tar.xz", "sha256": "0778b625646d6d934cf252d58a2e16403889da6bfc237bdca1d3cb3258f63d4e" } ] }

Community uptake Ships in most distros Fedora, Debian, Ubuntu, Arch, ClearLinux, OpenSuse, Mageira COPR for Centos/RHEL 3rd parties using flatpak Gnome KDE Endless Mobile LibreOffice Microsoft/Xamarin VMWare Flathub Work in progress

Questions More info at: http://flatpak.org Code: http://github.org/flatpak Talk to us: #flatpak on freenode https://lists.freedesktop.org/mailman/listinfo/xdg-app