Open WebOS on Fedora 17

The Open WebOS team is hard at work. As soon as I finished my post to build OpenWebOS on Fedora 16, they had already updated the build script to include more items, particularly the web browser. The browser required libraries that were only found in Fedora 17.

I had been looking for an excuse to update to Fedora 17, and now I found one.

Unfortunatly they aren’t prepared for a bleeding edge distribution like Fedora. The library pbnjson that they want to build, doesn’t like the yajl version 2.0.4. Fedora 16, and all of the supported Ubuntu versions, have yajl 1.0.x. And this library builds just fine with all the 1.x version.

So, to make a long story short, I’m working on putting things into rpm’s, so that I can build these packages on my terms. It will take me longer than using their script, but I will have more control, and it will be more reproduceable.

So far, I am using the system cmake, and I have made the cmake-modules-webos rpm.

cmake-modules-webos-0.9-1.fc17.src.rpm
cmake-modules-webos-0.9-1.fc17.noarch.rpm

As I work my way through each module, I’ll see if I can just use the system version instead of the Open WebOS version. Hopefully that will make things more system independant.

Open WebOS on Fedora 16

Relavent Links:
https://github.com/openwebos – Source code for Open WebOS
https://github.com/openwebos/build-desktop – Scripts to get it built and working on your desktop

Notes:

  • Open WebOS instructions and scripts are still in a state of being updated, this is a beta after all. So it’s possible my fixes aren’t needed, or possibly might not work.
  • This is on Fedora 16. Your milage may vary on anything else.

Steps:
We are going to be following the from Open WebOS, but only modifying them to work on Fedora. When in doubt, follow the official instructions.

1 – Install Packages

  • yum -y install git git-core make autoconf libtool tcl unzip curl qt-dev gcc-c++ yajl-devel yajl qt-devel sqlite-devel pkgconfig
  • yum -y install gperf bison flex glib2-devel openssl-devel libXi-devel libXrandr-devel libXfixes-devel libXcursor-devel freetype-devel libXinerama-devel mesa-libGL-devel gstreamer-devel gstreamer-plugins-base-devel libicu-devel
  • yum -y install boost-devel boost-devel uriparser-devel c-ares-devel libsigc++-devel glibmm24-devel db4-devel libcurl-devel

2 – Setup

  • mkdir webos
  • cd webos
  • git clone git://github.com/openwebos/build-desktop.git
  • cd build-desktop
  • *patch build-webos-desktop.sh*
  • *edit install-webos-desktop.sh*

    You need to replace ${HOME} with the full path for your home. The reason for this is because you need to “sudo” this script, and when you do, it replaces ${HOME} with /root/. This is ok if you are doing all these steps as root, but if you are a normal user, you have broken links all over the place.

3 – Build and Install
From this point on, our steps are the same as the official instructions. But I will put them here so you just have one page.

  • ./build-webos-desktop.sh
  • sudo ./install-webos-desktop.sh

    Be sure to replace ${HOME} with the path for your home area.

3 – Start and Run
Again, this part is straight from the official instructions.

  • ./service-bus.sh start
  • ./service-bus.sh services
  • ./service-bus.sh init
  • ./run-luna-sysmgr.sh
  • *When you are done, close things down with*

    ./service-bus.sh stop

Patch:

--- build-webos-desktop.sh.original	2012-09-08 09:08:02.573439051 -0500
+++ build-webos-desktop.sh	2012-09-07 22:49:51.403333099 -0500
@@ -892,8 +892,12 @@
     do_fetch openwebos/db8 $1 db8 submissions/
 
     ##### To build from your local clone of db8, change the following line to "cd" to your clone's location
-    cd $BASE/db8
+    #cd $BASE/db8
+    cd $BASE/db8.local/db8
+    #sed -i 's/TEST_TARGETS := libmojocore libmojodb/TEST_TARGETS := libmojodb/' build/Makefile.inc
+    #sed -i 's|/usr/local/lib|/usr/lib|' build/Makefile.inc
     make $JOBS -e PREFIX=$LUNA_STAGING -f Makefile.Ubuntu install BUILD_TYPE=release
+    #make $JOBS -e PREFIX=$LUNA_STAGING -f Makefile.Ubuntu install BUILD_TYPE=debug
     # NOTE: Make binary findable in /usr/lib/luna so ls2 can match the role file
     cp release-linux-x86/mojodb-luna "${ROOTFS}/usr/lib/luna/"
     # TODO: remove after switching to cmake
@@ -914,6 +918,7 @@
 
     ##### To build from your local clone of configurator, change the following line to "cd" to your clone's location
     cd $BASE/configurator
+    sed -i 's|-llunaservice -lmojo|-llunaservice /lib/libglib-2.0.so.0 -lmojo|' Makefile.inc
     ARCH_LDFLAGS="-Wl,-rpath-link $LUNA_STAGING/lib" make $JOBS -f Makefile.Ubuntu
     # NOTE: Make binary findable in /usr/lib/luna so ls2 can match the role file
     cp debug-linux-x86/configurator "${ROOTFS}/usr/lib/luna/"