Re: sdk notes



Forwarding this to the public list...

On tis, 2015-01-13 at 07:50 -0500, Matthias Clasen wrote:
Hey,

I still found it somewhat hard to get going with builds.

One problem I hit early on: I had xdg-app+ostree built by jhbuild, so
I ran it inside a jhbuild shell. This was giving me PKG_CONFIG_PATH
with /usr/lib64, causing glib includes to be messed up. Solution: just
add ~/gnome/bin to PATH, which is enough for xdg-app to run.

What exactly happened? xdg-app build re-sets PKG_CONFIG_PATH in order to
avoid such host issues affecting the app build.

Next problem: everything has problematic deps:
- I tried gnome-calculator, which needs gtksourceview, and
gtksourceview master depends on bleeding edge glib
- Then I tried gnome-characters, but that depends on libunistring
- Then I tried gnome-taquin, but that depends on libcanberra, which
failed to build with some libsystemd linking problem

Yeah, its pretty painful. Its why there are distros after all. Even more
painful is when there are build-requires on weird ass tools.
I think libcanberra should be in the platform as the audio stuff can be
a bit lowlevel. For the other stuff, I think we could make things easier
by having sharing rpms made for bundling so that you can easily bundle
things your app needs.

I switched to playing with srpms, and started over with gnome-calculator.

- I needed some tweaks to the gtksourceview spec to make it install on
the Sdk - drop libxml2-devel dep (not in rpmdb ?), drop glade-devel
dep, adjust file list accordingly - easy enough.

libxml2-devel is in the yocto base, so it unfortunately has a different
name (libxml2-dev i think?). glade-devel is not bundled.

- Of course, rpmbuild --rebuild just gives me an rpm that is
installing into /self, it does not actually populate the build
directory. I had to manually install the gtksourceview3 rpm before I
could build the gnome-calculator srpm.

Yeah + the devel ones.

After I installed that, I had the build directory populated with what
looks like the gnome-calculator app.
But what now ? There are still a few steps missing:
- The directory structure does not quite match what I see in the apps
in the repo.
How do I convert the build dir into such an app ?
How do I extract the exported files ?
Add more metadata ?
Import into an ostree repo, publish ?

Well, first of all what i generally do is run all the build steps like
this in one "build dir", where i can install -devel rpms, build tools,
etc. Then at the end i make a new one where i *just* install the final
non-devel rpms.

ATM there is no tooling to go from this state to an app. What you can do
is: 
* remove the "var" subdir (which you don't need in the final app)
* edit the metadata file, setting the permission keys, etc
* create a directory called "export" where you copy (including the
directory structure) from "files" the files you want to export. This is
typically .desktop files, hicolor icons, dbus service files, etc. (Note,
we don't yet do much with these other than to explode them. We want
triggers for icon updates, etc here.)

Then you can do:
 ostree  init --mode=archive-z2 --repo=/some/dir
 ostree commit --repo=/some/dir -b app/org.gnome.App/x86_64/master /the/source/dir

Then you can use /some/dir as a xdg-app repo, or copy it to a webserver first.

Obviously this part needs some more tooling. Not quite sure exactly how
it would look though.

I've updated the wiki page with some of the information from your mail
- do you think it would be useful to write more actual docs, like an
xdg-app man page, or some file format documentation for the metadata
file ? Looking for a way to help out...

I saw. Nice. I think it would probably be good to document what we have
now, although I'm not sure how final some of this is...


-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
       alexl redhat com            alexander larsson gmail com 
He's a gun-slinging vegetarian master criminal with no name. She's a 
mistrustful gypsy schoolgirl living homeless in New York's sewers. They 
fight crime! 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]