[Officeshots] KOffice 2.0 RC1 in Officeshots

Michiel Leenaars michiel.ml at nlnet.nl
Tue May 19 23:30:27 CEST 2009


Hi all,

hot on the heels of today's launch of Officeshots.org closed beta, we now have 
KOffice 2.0 RC1 running through the standard command line backend. It was very 
easy, so let me describe the steps.  As a extra I will tell you how I built it 
below (1), but first the general outline - which once you have the code should 
be done in fifteen minutes or so in similar cases.

I logged into CAcert.org, got a new client certificate, installed it in the 
browser (I imagine most people need to register, which will take only a minute 
or so extra). Went to https://officeshots.org and logged in with my key. I added 
a new factory (you need to be enabled as a factory owner for now) through 
https://officeshots.org/factories . I gave mine a name (NLnet3), and added 
kword, kspread and kpresenter workers, indicating RC1 as version and PDF 
output for now.

I went back to the browser and exported the CAcert client certificate to a 
combined certificate and private key in PEM format (thanks to the new info 
Sander put up on the site). In Firefox I went to Preferences, Advanced, View 
Certificates, Your Certificates. I selected my certificate and clicked Backup. I 
had to give a temporary password which was needed for the next step:

openssl pkcs12 -in certificate.p12 -out certificate.pem -clcerts

After that it was simple:

svn checkout http://code.officeshots.org/officeshots/trunk/factory

cd factory/conf
copy config.default.ini  to config.ini and opened it up in an editor

I changed the name of the factory to NLnet3, indicated where to find the cert 
files:

tls_certificate_file = /home/officeshots/certificate.pem 
tls_key_file = /home/officeshots/certificate.pem         

said which backends would be running:

backends = Kword, Kspread, Kpresenter

and defined the workers:

application = KWord
version = 2.0 RC1
#note: KOffice 2.0RC1 patched with http://lists.kde.org/?l=koffice-
devel&m=123762769225301&q=p7
doctype = odt
formats = pdf
backend = CLI
command = /usr/bin/kword --name=Officeshots --title=Officeshots.org --noxim --
geometry=100x100 --nograb --export-pdf --export-filename=%temp_dir/%jobid.
%dest_ext %source_path
result = %temp_dir/%jobid.%dest_ext
default_format = pdf

etc. The key thing to get right is the line with command, where you give the 
path to the binary, the necessary parameters for the app, the incoming filename 
%source_path, and the returning filename %temp_dir/%jobid.%dest_ext (i.e. the 
temporary directory, a unique jobid with the right extension. This then has to 
be replicated in the line result. " --export-pdf --export-filename=" is KOffice's 
way of handling this, but these will vary with your app.

As a service to the reader I added the full options I have in the running 
factory config to config.default.ini [diff attached], so hopefully Sander will 
approve this and get this available to all.

I went up in the config file and selected the backends I wanted to have in the 
factory:

backends = Kword, Kspread, Kpresenter

Save the file, and you're done. After that I only had to run:

python -d factory/src/factory.py

I had to give the password for the private key I made earlier. And I was up 
and running! Hopefully this is of help for those that want to try out other 
software or other versions (like KOffice trunk). And if people can tell me how 
to add ODF roundtripping or screen rendering in KOffice, that would be great.

Best,
Michiel Leenaars
NLnet Foundation
---
(1) I promised to say how I compiled KOffice RC1. Normally you would have the 
binary already, but for KOffice that was not the ase. Here's what I did on a 
Kubuntu Jaunty system to get it working:

wget  
https://launchpad.net/ubuntu/jaunty/+source/koffice2/1:1.9.99.9-0ubuntu1/+files/koffice2_1.9.99.9.orig.tar.gz  
https://launchpad.net/ubuntu/jaunty/+source/koffice2/1:1.9.99.9-0ubuntu1/+files/koffice2_1.9.99.9-0ubuntu1.diff.gz 
https://launchpad.net/ubuntu/jaunty/+source/koffice2/1:1.9.99.9-0ubuntu1/+files/koffice2_1.9.99.9-0ubuntu1.dsc

dpkg-source -x koffice2_1.9.99.9-0ubuntu1.dsc
cd koffice2-1.9.99.9
wget http://lists.kde.org/?l=koffice-devel&m=123762769225301&q=p7
patch -p1 < 0001-Add-feature-export-to-pdf-from-the-command-line.patch
dch

debuild -i -us -uc -b

It said I needed some depencies before I could build, which I added through 
apt-get:

sudo apt-get install quilt freeglut3-dev libglpk-dev libgraphicsmagick++1-dev 
libmysqlclient15-dev libpqxx-dev libgmm-dev libeigen2-dev libspnav-dev 
libopenctl-dev subversion python-m2crypto

[I added the subversion and python-m2crypto, although you only need them 
later]. So then we try anew:

debuild -i -us -uc -b

cd ..
sudo dpkg -i *.deb

I then had the patched KOffice installed.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: configkoffice20.patch
Type: text/x-patch
Size: 2653 bytes
Desc: not available
Url : http://lists.opendocsociety.org/pipermail/officeshots/attachments/20090519/d1edf6bd/attachment.bin 


More information about the Officeshots mailing list