Showing posts with label klik. Show all posts
Showing posts with label klik. Show all posts

Sunday, December 17, 2006

klik on Gentoo

I was looking for new less painful ways to test bleeding edge software. I didn't really want to have to write ebuilds for programs I may only start a few times and then remove and have to deal with it messing with my normal libraries. So I thought of a couple methods I could use, a chroot in my home directory or as another user like I do for KDE4, but both methods are cumbersome and kinda tricky. I just wanted something that worked and that I could install and uninstall software as a user for testing that wouldn't wreak havoc on the rest of the system.

Enter klik. Klik follows a simple paradigm of "1 application == 1 file." I ripped that right off their wiki. Now this is quite cool. Normal users can download and install software for themselves easily and the programs will just be stored as a single file. So if they don't want the program any more they just delete that file. System administrators and software testers rejoice!

Now most of the documentation for installing and using klik exists for (K)Ubuntu and OpenSuSE. I run Gentoo and I wanted to give it a shot. I mean klik is meant to be cross-distribution so this should be a cakewalk right?

I started as the documentation says
wget klik.atekon.de/client/install -O -|sh
The first thing I noticed is that klik requires two things to install properly:
  1. hald needs to be running. To do this just run /etc/init.d/hald start.
  2. You also need to be in the /etc/sudoers file.

No problem now I have klik installed and I'm going to install a piece of software using it. So I point my browser (you can use FireFox, Konqueror, Opera etc.) to klik://opera91 to install Opera 9.1 beta.

Here's where the problem really starts. klik requires rpm2cpio to install Opera91 (I'm not sure if this is required for all recipies). I go and emerge rpm to get rpm2cpio, but there's a nasty Gentoo bug that prevents beecrypt(the only dependency I have for rpm) from compiling. So I use the workaround by setting CFLAGS="-march=i686 -O2 -pipe" and emerge beecrypt. Then I emerge rpm using my normal settings from /etc/make.conf.

So now I have klik installed and I have the requisite rpm2cpio on the system. So once again I point my browser to klik://opera91. I get another error:
Please install libstdc++5.so in order to use klik. The installation will continue, but the resulting cmg files will be larger than neccessary.

I do have that library. I checked. It's in /usr/lib/libstdc++-v3 and I checked in /etc/ld.so.conf and that directory is there. Just for kicks I ran ldconfig just to be sure the library is findable and retried the klik installation of Opera 9.1 beta. I still got the same warning message. No biggie I guess it does say that installation will still run so here goes.

It prompts me to ask if it should download the files required to do the installation and I answer yes and it begins downloading the software. Then I get another error:
Unable to mount /tmp/app/1
Where is this coming from? I click OK to that dialog and I get this error:
/home/krakrjak/.zAppRun: line 132: /tmp/app/1/wrapper: No such file or directory
hrm....

The code says
RESULT=$($MOUNT/wrapper $@ 2>&1) || derror "$RESULT"
I didn't work out all the details, but it appears that it's trying to run a file from one of the mount points that klik puts in /etc/fstab. I checked my /etc/fstab and the entries are there, but I did notice something in particular. The new entries are marked as cramfs. I didn't have cramfs installed, so I quickly issued an emerge cramfs and went to check the kernel. Sure enough I didn't have support for cramfs either so I added it CONFIG_CRAMFS=m and compiled the module.

Now that I have the cramfs module compiled and loaded and the userland programs installed I set off to give klik another shot.

I still got the warning about libstdc++5.so, but the installation went off without a hitch this time. Here's a screenshot of Opera 9.1 Beta running:


So to recap, if you are running Gentoo and you want to install klik you need a few things to get it working correctly these are:
  • You need to be in /etc/sudoers

  • Start hald or install it then start it

  • Install rpm

  • Make sure you have cramfs installed and configured in your kernel

Fr1st ps0t

I've created this blog to place thoughts, musings, rants and ideas on FOSS. I have started testing new software like klik and KDE4 so I wanted a place to post problems and workarounds that I found. I also need a general place to rant occasionally when I ram my head against the wall on an problem.

Most likely I'll only post on average one post a day, but depending on how much time I get to do testing it could be more or less often.