Patching and compiling OpenOffice.org on Ubuntu Gutsy

If you noticed, I seems to disappear for 2 weeks because of freezing bug in OpenOffice.org. I spent 2 weeks for only one task; compiling OpenOffice.org on Ubuntu Gutsy. I'm not familiar with development environment used at Sun and in OpenOffice project. There are so many technical terms to learn. By the way, I finally add a patch from #81519 to OpenOffice.org 1ubuntu5 which my request #140878 is not responded yet. So it's time to share what I have done in this 2 weeks.

My first step was to obtain the latest source of openoffice.org.

apt-get source openoffice.org
apt-get build-dep openoffice.org

Wait for a while and I got openoffice.org-2.3.0 ready to build. I tried to rebuild immediately to make sure it work as expect by this source.

cd openoffice.org-2.3.0
debuild -uc -us

I waited for 13 hours to let it complete the process. Long waiting... Eventually, it worked as expect. Then I tried to see what I can do to this source and found that actually it contained build wrapper called ooo-build using based source called OOG680 at milestone m5. During that time, the latest version is SRC680 at m231. I tried to manually change based source to the latest one but unfortunately, lot of patches could not be applied successfully. Then I realized that ooo-build is a kind of patch system for OpenOffice. There are so many patches, 765 patches.

I tried to disable inapplicable patched one by one. This process took me a week without success. There are lots of patches to go. So I decided to try another approach. I tried to extract the patch for this issue to put it in ooo-build instead. But question is how? I searched in Google on how to work with OpenOffice.org. It took me a few days.

mkdir cvs
cd cvs
export CVSROOT=:pserver:anoncvs@anoncvs.services.openoffice.org:/cvs
cvs co OpenOffice

Warning: CVS size is about 2.3 GB. I was ready to run cvs diff but I need to know 2 tags. After looking around in Google again. I found that these 2 tags are in below format.

CWS_{uppercase MWS}_{uppercase CWS}_ANCHOR
CWS_{lowercase MWS}_{lowercase CWS}

For the fix of this issue, MWS is src680 and CWS is i18n38. So I have 2 tags like below.

CWS_SRC680_I18N38_ANCHOR
cws_src680_i18n38

Next thing I have to know is affected module. The correct way is to use cwsquery command but unfortunately, I don't have enough permission to run that command. By the way, ooo-build also provides tag list so I found below line.

i18n38 : SRC680_m228 : cws_src680_i18n38 : i18npool icu

Now I know 2 modules i18npool and icu so making patch should be as simple as below.

cvs -z3 diff -u -rCWS_SRC680_I18N38_ANCHOR -rcws_src680_i18n38 i18npool > i18n38-i18npool.diff
cvs -z3 diff -u -rCWS_SRC680_I18N38_ANCHOR -rcws_src680_i18n38 icu > i18n38-icu.diff

Then I had to edit the diff files to remove all changes regarding the change of file revision numbers and copy them to ooo-build/patches/src680. and add below lines to ooo-build/patches/src680/apply in section [ TemporaryHacks ].

# icu regression test
i18n38-i18npool.diff, i#81519, sugree
i18n38-icu.diff, i#81519, sugree

Next step is to build it again.

debuild -uc -us

Beware! You must have at least 9.5 GB to build. Below are products of my 2 weeks.

deb http://download.thaigrid.or.th/pub/ubuntu/contrib gutsy openoffice.org
deb-src http://download.thaigrid.or.th/pub/ubuntu/contrib gutsy openoffice.org

Simply sudo apt-get update and sudo apt-get upgrade to try. Note that if you want to see what I did last 2 weeks in details, read my tweets.

Tags: , , ,

เห็นหายไป

เห็นหายไป 2 อาทิตย์ ผมนึกว่าไป hack Twitter อยู่

เรื่อง patch นี่สุดยอดครับ อ่านแล้วสนุกดี

Help Diccionary

Hello. Excuse I do not speak ingles correctly I am using a translator. A favor I did everything now what you mention and I am myself, deso two things, first to include a ortografico corrector that create, and deseeo to include it in the compilation of openoffice that I am doing. Another thing that desire to do is to change the logo of openoffice when starting, adding my logo to him. Thanks Greetings

Help Diccionary (email tanyvillalba@yahoo.com)

Hello. Excuse I do not speak ingles correctly I am using a translator. A favor I did everything now what you mention and I am myself, deso two things, first to include a ortografico corrector that create, and deseeo to include it in the compilation of openoffice that I am doing. Another thing that desire to do is to change the logo of openoffice when starting, adding my logo to him. Thanks Greetings

Post new comment

The content of this field is kept private and will not be shown publicly.