Fedora runtime and apps (again)

Alexander Larsson alexl at redhat.com
Wed Jun 10 15:05:51 UTC 2015


Hi, it's me again. I've been doing some more work on a fedora-based
runtime and apps for xdg-app. 

First of all I've cleaned up the runtime itself. It is now consists of
a new rpm, "fedora-runtime"[1], which has a bunch of requires for all
the packages which are supposed to be in the runtime, as well as some
special configuration (ld.so, fontconfig) needed in the runtime.
There is also a fedora-sdk rpm which pulls in fedora-runtime + dnf and
a few development tools.

I've built these rpms in the copr here: 
  https://copr.fedoraproject.org/coprs/alexl/fedora-runtime/

This means that the rpm-ostree json file[2] which describes the runtime
is super-trivial, as it just has the f22 repo and the copr repo, and
lists just the fedora-runtime package. See

If you have rpm-ostree-2015.6-2.fc22 installed (in koji for f22) all
you have to do is check out 
https://github.com/alexlarsson/fedora-runtime and run "make" (or
something like "make PROXY="--proxy=http://127.0.0.1:8123" if you have a http proxy set
up).

If you just want to test this i've updated the repo at 
  http://people.redhat.com/~alexl/repo/

You should be able to test it (and the evince demo app i built) by
installing xdg-app 0.3.1 (in updates-testing) and doing: 

  xdg-app add-remote --no-gpg-verify --user fedora http://people.redhat.com/~alexl/repo/
  xdg-app install-runtime --user fedora org.fedoraproject.Platform 22
  xdg-app install-app --user fedora org.gnome.evince
  xdg-app run org.gnome.evince

I've also done various kinds of experiments with creating applications
from existing fedora packages. In the end I realized that the only sane
way to make it work is to rebuild the packages with a custom rpm setup
that has %{_prefix} as "/app" and some other stuff. So, i set up a mock
configuration[3] that lets you easily rebuild packages in /app. It
mostly sets rpm macros and environment variables so that things build,
although I had to make changes to some packages (rpm to make brp
-compress compress inside /app, and check-rpaths to make rpaths in
/app/lib* ok, and pkg-config to be able to override .pc variables[4]).
These packages are in the copr above, so the mock config will
automatically pick them up.

There are also some simple scripts running mock in the git repo, so you
can easily rebuild an app from srpms. Here is how I built the evince
app:

    for srpm in ghostscript-9.16-2.fc22.src.rpm ghostscript-fonts-5.50-33.fc21.src.rpm poppler-data-0.4.7-3.fc22.src.rpm poppler-0.30.0-3.fc22.src.rpm libspectre-0.2.7-5.fc22.src.rpm libgxps-0.2.2-11.fc22.src.rpm gnome-desktop3-3.16.2-1.fc22.src.rpm evince-3.16.1-1.fc22.src.rpm; do
        ./build-srpm.sh srpms/$srpm
    done

    xdg-app build-init evincedir org.gnome.evince org.fedoraproject.Sdk org.fedoraproject.Platform 22
    ./build-app.sh evince evincedir
    xdg-app build-finish --command=evince --socket=x11 --filesystem=host evincedir
    xdg-app build-export /some/repo evincedir

All the srpms I rebuilt for evince worked as-is when rebuilt in /app,
but I'm pretty sure some specfiles may need minor tweaks to fully
support building in a different prefix, and we still need to rename the
desktop files to the app-ids for the exports to work.

Is this work something we as a project are interested in doing?

[1] https://github.com/alexlarsson/fedora-runtime/blob/master/specfiles/fedora-runtime.spec
[2] https://github.com/alexlarsson/fedora-runtime/blob/master/fedora-runtime.json
[3] https://github.com/alexlarsson/fedora-runtime/blob/master/fedora-app-22-x86_64.cfg
[4] https://bugs.freedesktop.org/show_bug.cgi?id=90917

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
       alexl at redhat.com            alexander.larsson at gmail.com 
He's an ungodly devious dog-catcher searching for his wife's true killer. 
She's a transdimensional renegade schoolgirl in the wrong place at the 
wrong time. They fight crime! 



More information about the desktop mailing list