Upgrade to Pro — share decks privately, control downloads, hide ads and more …

openSUSE Conference 2017: OBS <B AppImage

openSUSE Conference 2017: OBS <B AppImage

Providing desktop applications to multiple Linux-based target systems (distributions) can be cumbersome. Whereas upstream application authors have always had the possibility to offer downloads for Windows and macOS, distributing packages for Linux has traditionally required a lot of additional duplicated effort from maintainers, and does not scale well beyond the core set of applications that are part of the distributions.

Lately, application bundle formats like AppImage, Flatpak, and Snap have gained popularity in the Linux world, with Linux Torvalds calling AppImage "just great" and users appreciating the ease of the "one app = one file" concept.

Providing an application in AppImage format can have many advantages:
- Just one format for many major distributions like openSUSE, Ubuntu, Fedora, CentOS, Debian, and others
- Super simple for users: just download one file, make it executable, and run
- No unpacking or installation necessary
- No root needed
- No system libraries changed
- Works out of the box, no installation of runtimes needed
- Optional desktop integration with `appimaged`
- Optional binary delta updates (only download the bytes that have changed between builds)
- GPG signatures (inside the file)
- Works on Live ISOs and when booting into multiple different distributions

On the flipside, it has been argued that distributing application bundles places additional burden on upstream application authors, who now also need to keep the bundled libraries up-to-date. Tools used by distributions can greatly mitigate this, by ensuring reproducible, up-to-date builds from trusted sources.

In this talk, Open Build Service lead developer Adrian Schröter and AppImage lead developer Simon Peter illustrate the challenges around providing quality application bundles and how they can be solved by using proven distribution methodologies such as those provided by the Open Build Service.

probonopd

May 27, 2017
Tweet

More Decks by probonopd

Other Decks in Programming

Transcript

  1. OBS AppImage
    openSUSE Conference
    May 27, 2017
    Simon Peter
    AppImage
    Adrian Schröter
    Open Build Service
    Portable cross-distro application bundles
    for the Linux desktop

    View Slide

  2. THE PROBLEM

    View Slide

  3. "As a developer, I want to reach
    users with minimal effort"

    View Slide

  4. .exe .dmg ?

    View Slide

  5. Approach #1
    OBS

    View Slide

  6. „Let‘s take the distribution
    approach and scale it“

    View Slide

  7. A system to build distributions in a
    controlled way
    Allow application authors to package
    applications for all major distributions
    CENTRAL IDEA

    View Slide

  8. Source
    (from User)
    Base Binaries
    (from OBS)
    OBS checks
    sources and
    binares. And may
    build the source.
    Published Binaries

    View Slide

  9. Authors can get newer applications to mature distributions
    Application authors can leverage already-packaged
    dependencies
    Optimized for base distribution
    Optional submission to become part of official distribution
    SOLVES...

    View Slide

  10. Still cannot link to a file for Linux
    Still needs to understand RPM spec files, debian packaging
    Still need to install applications before using them
    Still need a package manager, mess around with repositories
    Still need root rights to install
    BUT...

    View Slide

  11. Approach #2
    AppImage

    View Slide

  12. „Let‘s take the un-distro
    approch, like Windows and
    macOS“

    View Slide

  13. .exe .dmg .AppImage

    View Slide

  14. Distribution = base system
    Applications directly from original
    authors (upstreams)
    Like Windows and macOS
    CENTRAL IDEA

    View Slide

  15. DEMO

    View Slide

  16. EXECUTABLE
    EXECUTABLE
    SQUASHFS IMAGE
    SQUASHFS IMAGE
    AppImage
    • One file per app
    and version

    View Slide

  17. EXECUTABLE
    EXECUTABLE
    SQUASHFS IMAGE
    SQUASHFS IMAGE
    AppImage
    • Binary
    • Mounts the image
    with FUSE when
    executed

    View Slide

  18. EXECUTABLE
    EXECUTABLE
    SQUASHFS IMAGE
    SQUASHFS IMAGE
    AppImage • Bundle app and
    everything that is not
    part of all target
    systems: icons, i18n,
    Qt 5, KF5,…
    • Built on host that as
    old as the oldest target
    systems

    View Slide

  19. MORE
    • Binary delta updates
    using AppImageUpdate – only download what has
    changed
    • Sandboxing
    using, e.g., Firejail
    • Optional appimaged daemon
    for desktop integration (menus, icons, MIME types,
    updates,...)

    View Slide

  20. Works for all common Linux distributions
    Run the latest applications on mature (e.g.,
    enterprise) OSes
    One app = one file
    Super simple for users: just download one
    AppImage file, make it executable, and run
    No unpacking or installation necessary
    SOLVES...

    View Slide

  21. No root needed
    No system libraries changed
    Works out of the box, no installation of runtimes
    needed
    Works on Live ISOs, university lab computers,...
    Can use the same AppImages when dual-booting
    multiple distributions
    SOLVES...

    View Slide

  22. „This is just very cool.“
    https://plus.google.com/+LinusTorvalds/posts/WyrATKUnmrS

    View Slide

  23. Krita
    OFFICIAL APPIMAGES
    Microsoft
    PowerShell
    KDevelop
    Scribus
    OpenShot
    digiKam
    JetBrains
    Toolbox
    MuseScore
    Kdenlive
    Subsurface
    ImagePlay
    Drawpile
    ...hundreds more
    Avidemux
    https://github.com/probonopd/AppImageKit/wiki/AppImages

    View Slide

  24. BUT...
    FOSDEM 2017

    View Slide

  25. Author needs a trusted, reliable, auditable build system
    Author needs to track security updates of dependencies
    Author needs to ensure licensing compliance
    BUT...

    View Slide

  26. View Slide

  27. BETTER
    TOGETHER

    View Slide

  28. OBS AppImage

    View Slide

  29. OBS: trusted, reliable, auditable build system
    that tracks security updates of dependencies, ensures
    licensing compliance, and hosts build products
    AppImage: simple bundle format that allows upstream
    application authors to reach Linux users easily
    An ideal match!
    OBS APPIMAGE

    View Slide

  30. DEMO

    View Slide

  31. Packaging workshop this afternoon:
    let‘s take your application
    and package it as an AppImage on OBS
    Not signed up? Don‘t worry:
    „Hello world“ at https://build.opensuse.org/package/show/home:probono/QtQuickApp
    Instructions on https://github.com/probonopd/AppImageKit/wiki/Using-Open-Build-Service
    OBS APPIMAGE

    View Slide

  32. appimage.org
    #AppImage
    build.opensuse.org
    #opensuse-buildservice

    View Slide

  33. BACKUP

    View Slide

  34. "As a tester, I want to run
    multiple builds without
    messing up my system.“

    View Slide

  35. "As a user, I want to
    download an application
    from the original author
    and run it, now!“

    View Slide

  36. mkdir ­p leafpad/leafpad.AppDir && cd leafpad
    # Get existing binary
    wget ­c „http://.../leafpad_0.8.17­2_amd64.deb“
    # Turn into an AppDir
    cd leafpad.AppDir
    dpkg ­x ../leafpad_*.deb .
    cp ./usr/share/icons/hicolor/scalable/apps/leafpad.svg .
    cp ./usr/share/applications/leafpad.desktop .
    wget ­c https://.../AppRun
    chmod a+x AppRun
    cd ..
    # Package as an AppImage
    wget ­c https://.../appimagetool.AppImage
    chmod a+x ppimagetool.AppImage
    ./appimagetool.AppImageleafpad.AppDir/
    HELLO WORLD,…

    View Slide

  37. …MORE LIKE THIS
    # Build on an „old enough“ build system
    (for which recent compilers and build tools exist, e.g., CentOS 6.x)
    # Make sure it is relocatable (no hardcoded „/usr“); otherwise patch it
    # Turn into an AppDir
    ...
    chmod a+x AppRun
    # Bundle any libraries that might not be there in a recent enough version
    # on each target system
    # Package the AppDir as an AppImage
    ...
    ./appimagetool.AppImage leafpad.AppDir ./Leafpad­x86_64.AppImage
    # Test on each target system ­ really! (I use Live ISOs)

    View Slide

  38. CONTINUOUS APPIMAGE WORKFLOW
    2
    Push
    commit to
    GitHub
    1
    Prepare
    build sys-
    tem, e.g.,
    CentOS 6
    with Qt5,…
    3
    Build and
    package
    as an
    AppImage
    4
    Upload to,
    e.g., Bintray,
    GitHub
    Releases
    5
    Post
    download
    link on
    Project
    homepage

    View Slide