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%22%C2%A0if 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-r... [2] https://github.com/alexlarsson/fedora-runtime/blob/master/fedora-runtime.jso... [3] https://github.com/alexlarsson/fedora-runtime/blob/master/fedora-app-22-x86_... [4] https://bugs.freedesktop.org/show_bug.cgi?id=90917
On ons, 2015-06-10 at 17:05 +0200, Alexander Larsson wrote:
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/
I've done some further changes to the runtime, including rebasing it on rawhide. I also managed to create a version of the fedora-app-build that contains all rpm macros for building app-bundled version of the fedora rpms, and i've made a copr repo that automatically builds such rpms: https://copr.fedoraproject.org/coprs/alexl/fedora-apps/
In this copr I then built evince and gedit + their non-runtime dependencies, so that you can easily build app bundles based on these. In fact the git repo has a simple script (build-demo-apps.sh) that builds them.
I pushed a new repo with these runtimes and app, so you can easily try rawhide version of gedit and evince on fedora 22 like this:
xdg-app add-remote --no-gpg-verify --user fedora http://fedorapeople.org/~alexl/repo/ xdg-app install-runtime --user fedora org.fedoraproject.Platform 23 xdg-app install-runtime --user fedora org.fedoraproject.Sdk 23 xdg-app install-app --user fedora org.gnome.gedit xdg-app install-app --user fedora org.gnome.evince
It seems to me that this setup is working, and with some packaging work making sure the right things are in the runtime and that any spec changes needed for building with a different prefix then we could essentially have a read-only-/usr Atomic-based Fedora Workstation that allows you to install (not-super-sandboxed) desktop apps.
Proving that basically concludes my experiments though. If we really want that to happen we need more than one person kinda playing around with this.
On Tue, 2015-06-16 at 16:18 +0200, Alexander Larsson wrote:
Proving that basically concludes my experiments though. If we really want that to happen we need more than one person kinda playing around with this.
Hi Alex, would you be able to attend the next Workstation WG meeting (this Monday at 9:00 AM EDT) if we put xdg-app on the agenda for discussion?
desktop@lists.stg.fedoraproject.org