I thought it would be good to create an OpenSUSE container on my Ubuntu LXC machine.

I am using the existing OpenSUSE template in /usr/lib/lxc/templates/lxc-opensuse, and some SUSE packages built by Thomas-Karl Pietrowski for Ubuntu from https://launchpad.net/~thopiekar/+archive/zypper, and the build scripts from https://github.com/openSUSE/obs-build

This is how you do it (tested with Ubuntu 12.04):

apt-get install python-software-properties
add-apt-repository ppa:thopiekar/zypper 
apt-get update
apt-get install rpm zypper libsolv-tools
wget -O obs-build.tar.gz https://github.com/openSUSE/obs-build/archive/master.tar.gz
tar xzf obs-build.tar.gz
mkdir -p /usr/lib/build
mv obs-build-master/* /usr/lib/build
 
# small fixes for the template to avoid some errors
sed -i 's/--non-interactive --gpg-auto-import-keys/--gpg-auto-import-keys/g' /usr/lib/lxc/templates/lxc-opensuse
sed -i 's#chpasswd#/usr/sbin/chpasswd#g' /usr/lib/lxc/templates/lxc-opensuse
lxc-create -t opensuse -n demoOpenSuse
lxc-start -n demoOpenSuse
# login with root and password root

Things still to be done:

The creation of the image is interactive, since there seems to be unknown keys:
File ‘content’ from repository ‘repo-oss’ is signed with an unknown key ”. Continue? [yes/no] (no): y
File ‘repomd.xml’ from repository ‘update’ is signed with an unknown key ”. Continue? [yes/no] (no): y

/usr/lib/lxc/templates/lxc-opensuse: line 110: patch: command not found

If there are problems with the root password, try this:
echo “root:root2” | chroot /var/lib/lxc/demoOpenSuse/rootfs /usr/sbin/chpasswd

I think the network is not established yet.

But hopefully this is a start…

Tags: , ,
Posted in Software Development | Comments Closed

My testing environment is a workstation running on a JiffyBox, using X2Go

Here are the steps that I use to setup my machine with OpenSUSE 12.3:

zypper install -t pattern kde4 kde4_basis findutils-locate

Install X2Go as described here:

zypper addrepo http://download.opensuse.org/repositories/X11:RemoteDesktop:x2go/openSUSE_12.3/X11:RemoteDesktop:x2go.repo
zypper refresh
zypper install x2goserver

Then I run these commands so that the login works with a password:

/etc/init.d/x2gocleansessions start
sed -i "s/PasswordAuthentication .*/PasswordAuthentication yes/g" /etc/ssh/sshd_config
/etc/init.d/sshd start
useradd myusername -m
passwd myusername

To install the latest MonoDevelop, follow these instructions:

zypper addrepo http://download.opensuse.org/repositories/home:tpokorra:mono/openSUSE_12.3/home:tpokorra:mono.repo
zypper refresh
zypper install monodevelop-opt

Now I had the problem that MonoDevelop did not start.

I tried everything:

. /opt/mono/env.sh
cd /opt/monodevelop/lib/monodevelop/bin
strace MONO_LOG_LEVEL=debug mono -O=-aot  MonoDevelop.exe

but no error message that I would understand.

Then I tried running monodoc, and this finally gave an error that I could understand:

The program 'browser' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadValue (integer parameter out of range for operation)'.
  (Details: serial 131 error_code 2 request_code 25 minor_code 0)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)

This lead me to this bug report: https://bugs.eclipse.org/bugs/show_bug.cgi?id=386955 which mentions X2Go. At the end of that bug, it says that a specific version of Cairo does not support old XRenderers anymore. It has been fixed in version http://www.cairographics.org/news/cairo-1.12.10/

To build and install that version of Cairo, I followed these steps:

wget http://www.cairographics.org/releases/cairo-1.12.16.tar.xz
tar xf cairo-1.12.16.tar.xz
cd cairo-1.12.16
zypper install gcc libpng-devel libpixman-1-0-devel make libX11-devel libXrender-devel libXext-devel libXt-devel fontconfig-devel
./configure --prefix=/usr --enable-xlib
make
make install

Now MonoDevelop and monodoc start fine on OpenSUSE over a remote connection via X2Go.

Tags: , ,
Posted in Software Development | Comments Closed