Difference between revisions of "Ubuntu Build in a VMware Appliance"

From Apache OpenOffice Wiki
Jump to: navigation, search
 
(Background)
Line 4: Line 4:
  
 
This page is an output following various false start and permutations, where I settled on the follwing parameters:
 
This page is an output following various false start and permutations, where I settled on the follwing parameters:
* '''Which code-base to use?'''.  My previous playpen work was on ubuntu on an OOo 2.0.2 build doing some bug hunting.  This was based on the [[ooo-biuld]] ubuntu release which really helped me get up and running a lot quicker.  The problem came when I started to make changes or hunt bugs.  Was the code that I was looking at base OOo code or something that the VBA project etc. introduced?  This all made getting changes in a lot more difficult, so I promised that next time I would use the standard OOo kit as my baseline.  Well this is the next time.
+
* '''Which code-base to use?'''.  My previous playpen work was on ubuntu on an OOo 2.0.2 build doing some bug hunting.  This was based on the [[ooo-Build]] ubuntu release which really helped me get up and running a lot quicker.  The problem came when I started to make changes or hunt bugs.  Was the code that I was looking at base OOo code or something that the VBA project etc. introduced?  This all made getting changes in a lot more difficult, so I promised that next time I would use the standard OOo kit as my baseline.  Well this is the next time.
 
* '''Which OS variant to use?'''.  For historic, work and family reasons my PCs all run WinXP.  (Never again, I promise myself).  However, the only way you can develop and debug on WinXP in a supported way is by paying Microsoft some more money and I was reluctant to do this, so a Linux build is the opbious choice.  Since I had used Ubuntu last time, had been impressed by the integration of my openSUSE playpen, I thought that I'd try openSUSE which I found was a nice bundle with a lot of Windows features.  The problem was that I found it too like Windows, and this started to irritate after while, as I like my development environments lean &mash; why do you need 3 Terminal programs, 3 Web browsers, etc.  So I ended going back to Ubuntu.  I just felt more comfortable there, OK.   
 
* '''Which OS variant to use?'''.  For historic, work and family reasons my PCs all run WinXP.  (Never again, I promise myself).  However, the only way you can develop and debug on WinXP in a supported way is by paying Microsoft some more money and I was reluctant to do this, so a Linux build is the opbious choice.  Since I had used Ubuntu last time, had been impressed by the integration of my openSUSE playpen, I thought that I'd try openSUSE which I found was a nice bundle with a lot of Windows features.  The problem was that I found it too like Windows, and this started to irritate after while, as I like my development environments lean &mash; why do you need 3 Terminal programs, 3 Web browsers, etc.  So I ended going back to Ubuntu.  I just felt more comfortable there, OK.   
 
* '''Dedicated or VM?'''.  I am pre-fashionable Green.  I hate having too many boxs and hat chucking stuff away.  I hate having big electricity bills and a noisey office.  So for me I like sanpits that I can take anywhere and the means Virtual, and clearly one major adjantage of this is that you can decouple your sandbox OS from your host OS, especially if your VM monitor supports mulit-platform hosting (thus eliminating MSVPC and Xen, etc from my list).  This drew me to the free, though not [http://en.wikipedia.org/wiki/FLOSS FLOSS], VMware Player product as my runtime vehicle of choice.   
 
* '''Dedicated or VM?'''.  I am pre-fashionable Green.  I hate having too many boxs and hat chucking stuff away.  I hate having big electricity bills and a noisey office.  So for me I like sanpits that I can take anywhere and the means Virtual, and clearly one major adjantage of this is that you can decouple your sandbox OS from your host OS, especially if your VM monitor supports mulit-platform hosting (thus eliminating MSVPC and Xen, etc from my list).  This drew me to the free, though not [http://en.wikipedia.org/wiki/FLOSS FLOSS], VMware Player product as my runtime vehicle of choice.   

Revision as of 23:26, 12 August 2007

BUILDING OOo 2.2.1 over a Ubunt 6.10 (Edgy) VM

Background

This page is an output following various false start and permutations, where I settled on the follwing parameters:

  • Which code-base to use?. My previous playpen work was on ubuntu on an OOo 2.0.2 build doing some bug hunting. This was based on the ooo-Build ubuntu release which really helped me get up and running a lot quicker. The problem came when I started to make changes or hunt bugs. Was the code that I was looking at base OOo code or something that the VBA project etc. introduced? This all made getting changes in a lot more difficult, so I promised that next time I would use the standard OOo kit as my baseline. Well this is the next time.
  • Which OS variant to use?. For historic, work and family reasons my PCs all run WinXP. (Never again, I promise myself). However, the only way you can develop and debug on WinXP in a supported way is by paying Microsoft some more money and I was reluctant to do this, so a Linux build is the opbious choice. Since I had used Ubuntu last time, had been impressed by the integration of my openSUSE playpen, I thought that I'd try openSUSE which I found was a nice bundle with a lot of Windows features. The problem was that I found it too like Windows, and this started to irritate after while, as I like my development environments lean &mash; why do you need 3 Terminal programs, 3 Web browsers, etc. So I ended going back to Ubuntu. I just felt more comfortable there, OK.
  • Dedicated or VM?. I am pre-fashionable Green. I hate having too many boxs and hat chucking stuff away. I hate having big electricity bills and a noisey office. So for me I like sanpits that I can take anywhere and the means Virtual, and clearly one major adjantage of this is that you can decouple your sandbox OS from your host OS, especially if your VM monitor supports mulit-platform hosting (thus eliminating MSVPC and Xen, etc from my list). This drew me to the free, though not FLOSS, VMware Player product as my runtime vehicle of choice.
  • One 'disk' or two?. Again after various debates and getting burnt, I decided that I would split my VM over two virtual HDDs Splitting it into system disk + dev disk like this makes a lot of sense. The system disk is pretty non-volitile as far as development goes so the image can be backed up once and replicated across shared developers easily, since the ZIP container is only about 1Gbyte. The dev disk basically contains the OOF680xxx dev tree. This is also a lot easier to back up, say by ZIPing it into a backup directory. This ZIP will fit onto a DVD or a large USB stick, just in case you want to collaborate or move the dev environment around.

You need at least 1Gyte RAM in your PC with 2 Gbyte preferred (or required if you use Vista as your OS). You will need also quite a lot of room on a HDD that you are going to use. I would recommend a minimum of 20Gbyte. You are going to run your development environment in a VM which needs to be hosted on your native OS, so keep away from Xen if you use Linux -- at least for this approach. As I said, it doesn't matter whether your host is WindowXP (etc.) or Linux, but if you follow this page you are going to be doing all your hacking in a guest VM which runs Ubuntu 6.10 variant of Linux, so you will need developer familiarity with the unix development tools.

Setting up for the build

First you need to download the VMare Appliance Player from VMware Player Download. You will need the correct kit according to whether your machine runs Window or Linux. Install this on your PC, and create a container folder on your HDD to hold your work. You next need to download the Ubuntu 6.10 Appliance VMware Virtual Applicance MarketPlace, and the one that you are looking for is the "Ubuntu 6.10 (Edgy)" appliance. This is an HTTP download of a ZIP file of around 755MBytes, so broadband is essential. Create a directory called Ubuntu 6.10 on your host PC and extract the VMDK file in the downloaded zip file into this folder, then rename it to Ubuntu1.vmdk. (You'll see why later). Now download [this ZIP file] which contains the rest of the files that you need to build your appliance and add them to your Ubuntu 6.10 folder, so that it shoul now contain the following files:

  • ubuntu.vmx. This contains the parameter which the VMserver what devices are attached, such as Virtual HDDs, CDs, scree etc.
  • ubuntu1.vmdk. This is the downloaded virtual disk contain /root /home etc. It's only and 8Gbyte image which is just too small to build OOo 2.2.1 for hacking, so I have added
  • ubuntu2.vmdk. This contains an empty 12Gbyte efs3 partition, which shows up in the system as /dev/sdb2, and it is in this that you will build the OOo kits.
  • ubuntu.mvram. This contains the virtual BIOS.

There is some customisation that you need to do when you start up the image for the first time:

  • Hit ESC when you first enter the grub loader and select the recovery mode. This brings you into the console prompt. Change directory to /etc/X11 and remove the copy back the xorg.conf. berforeVMtoolsInstalled back over xorg.conf, then hit ^D to continue the boot. The reason for this was that the creator of the kit did a sudo dpkg-reconfigure -phigh xserver-xorg which wiped out the standard VMware xorg.conf. Without this you can't get sensible screen sizes in your VM. You also need to go into System->Preferences and System->Administration to configure your keyboard, mouse, Time region, etc.. For some reason, I've found that the network needs one reboot before the device drivers see it.

Since the Ubuntu kit by design a fairly minimalist install, there are quite a few packaged that you need missing so you will also need to do a

sudo apt-get -y install cvs automake1.9 build-essential libpam0g-dev libpng12-dev flex \
    bison libgtk2.0-dev libcupsys2-dev java-gcj-compat-dev libarchive-zip-perl  \
    libjpeg62-dev libxml2-dev python-dev libdb4.3-dev libdb4.3-java-dev libcurl3-dev \
    unixodbc-dev libldap2-dev libnspr-dev libnss-dev libsane-dev libxaw-headers \
    libbonobo2-dev libaudio-dev libsndfile1-dev libgnomevfs2-dev \
    libstartup-notification0-dev ant

Though unfortunately, a few of the packages expect headers in the wrong directories, so you also need to add the following symlings to make the compile work:

cd /usr/include
sudo ln -s /usr/lib/jvm/java-gcj/include/jni.h
sudo ln -s /usr/lib/jvm/java-gcj/include/jni_md.h
sudo ln -s /usr/lib/jvm/java-gcj/include/jawt.h
sudo ln -s /usr/lib/jvm/java-gcj/include/linux/jawt_md.h
cd /usr/lib
sudo ln -s libXaw7.so.7.0.0 libXaw.so

You now need to setup your dev-disk, so the first thing that you need to do is to create amount point and mount it. This is basically an empty efs3 10Gyte disk with one file in a folder called misc: the config.sh which contains the configure command discussed later.

cd ~
sudo mkdir /OOO-dev
mount /dev/sdb1 /OOO-dev
ln -s /OOO-dev/misc misc</code>
sudo mkdir /OOO-dev/OOF680_m18
sudo chown ubuntu:ubuntu /OOO-dev/OOF680_m18 
ls -s /OOO-dev/OOF680_m18

You also need to remove the use System->Synaptic Package Manage to remove the pre-installed OpenOffice configuration. Look for OpenOffice.org-core, remove this and the manager will unistall the rest. Now do the build This takes maybe twelve hours.

cd /OOO-dev/OOF680_m18
cd configure_office
source ~/misc/config.sh
./bootstrap
cd ..
source LinuxIntelEnv.Set
rehash
dmake >& ~/logs/dmake1A.log

and sit back and wait until this completes. The machine is going to be pretty much 100% compute bound for the next 12 hrs. Lastly to install it ready for hacking:

cd ~/OOF680_m18/instsetoo_native/unxlngi6.pro/OpenOffice/deb/install/en-US
sudo dpkg --install -R DEBS
Personal tools