Sorry for spamming planet.gentoo.org with old stuff. I simply edited labels on old posts which apparently modified the last edit date and pushed them into the RSS feed again. Any hint on how I can prevent such a thing when blogging via blogger.com?
Wednesday, July 30, 2008
Tuesday, July 29, 2008
Horde_Kolab_Server-0.1.0 and Horde_Kolab_Format-0.1.1 have been released!
The Horde project released the second PHP PEAR package representing a small subpart of the Kolab functionality within the Horde framework: Horde_Kolab_Server.
The package allows to access the Kolab LDAP database. Some examples are being given on a page in the Kolab wiki.
The package is the second in a series of five packages that will be released over the next few months. The full set of packages will allow you to easily deal with data stored on a Kolab server within your own web applications.
In addition the Horde_Kolab_Format-0.1.1 has been released. This is a bug fix release.
Wednesday, July 16, 2008
Kolab on Gmail
In the recent weeks the Kolab specific code in Horde has been significantly restructured to make it more developer-friendly. This cleanup also made it easy to add a small hack that allows you to run Horde with a standard IMAP server that provides no support for folder annotations as a back end.
The Kolab concept is based on IMAP folder annotations but so far the feature is only being provided by the Cyrus IMAP server. In addition the Kolab Server uses some patches in that area which means that you always need a full Kolab Server as a basis for Kolab specific development.
For Horde this means that the other developers have no chance to test the Kolab specific code sections even if they sometimes need to touch these areas. But installing a Kolab server is too much of a hurdle.
So I always wanted to allow running the Kolab code on a plain IMAP server. And ever since Gmail started providing IMAP access I considered the idea of Horde/Kolab on Gmail as a back end a nice toy thing.
Today the code that allows this went into Horde CVS. It is far from finished but it is sufficient to provide you with a demo installation.
You can use standard Gmail credentials there. But please be aware that I could grab these credentials! So you should only use a dummy account in your own best interest.
You'll certainly find many bugs or things that are not working yet but it is of course just a demonstration.
This line of coding is something I won't invest too much time into. It will never get any support from Kolab (as using annotations is the better solution) and I don't guarantee you that the format I'm using stays the same. So if you'd start using the code in a production environment the next upgrade might prevent access to the old data.
The main intention of this is to ease access to the code and allow more people to play with it.
The way things work at the moment is a special Kolab XML format for storing annotations. Each folder gets a single message in this format that carries the UID "1". This message holds all annotation values you'd usually store as folder metadata.
If you want to configure a Horde CVS installation specifically for Gmail you will still need to patch some IMAP parts. For other IMAP servers this might not be necessary.
Friday, July 11, 2008
First part of SyncML concluded
p@rdus completed coding on SyncML for Kolab a while ago and after some serious testing Univention uses the code in production.
In addition a short press release has been issued on several channels.
Horde_Kolab_Format-0.1.0 has been released!
The Horde project released a first PHP PEAR package representing a small subpart of the Kolab functionality within the Horde framework: Horde_Kolab_Format.
The package allows you to read and write the Kolab XML format. The XML data is converted from or to a data array within PHP. Some examples are being given on a page in the Kolab wiki.
The package is the first in a series of five packages that will be released over the next few months. The full set of packages will allow you to easily deal with data stored on a Kolab server within your own web applications.
Wednesday, July 09, 2008
Generating a PEAR test environment for releasing PEAR packages
As a developer you will often have a high number of different libraries installed. This will usually not match the users situation that will be nearer to the minimal number of required libraries. This may turn out to be a problem when releasing packages as missing dependencies can be easily overlooked.
For releasing PHP PEAR packages it makes sense to get a separate PEAR environment for testing if the package to be release has a correct set of dependencies. If PEAR is already installed on the system, the steps for that are straight forward.
Setup the new repository
Create the test environment with
# mkdir ~/pear-test
A separate PEAR configuration will be needed there:
# pear config-create ~/pear-test ~/pear-test/.pearrc CONFIGURATION (CHANNEL PEAR.PHP.NET): ===================================== ...
All that is required to complete the test environment is the installation of PEAR itself:
# pear -c ~/pear-test/.pearrc install -o PEAR WARNING: channel "pear.php.net" has updated its protocols, use "channel-update pear.php.net" to update Did not download optional dependencies: pear/XML_RPC, use --alldeps to download automatically pear/PEAR can optionally use package "pear/XML_RPC" (version >= 1.4.0) downloading PEAR-1.7.2.tgz ... Starting to download PEAR-1.7.2.tgz (302,744 bytes) ..........................done: 302,744 bytes downloading Archive_Tar-1.3.2.tgz ... Starting to download Archive_Tar-1.3.2.tgz (17,150 bytes) ...done: 17,150 bytes downloading Structures_Graph-1.0.2.tgz ... Starting to download Structures_Graph-1.0.2.tgz (30,947 bytes) ...done: 30,947 bytes downloading Console_Getopt-1.2.3.tgz ... Starting to download Console_Getopt-1.2.3.tgz (4,011 bytes) ...done: 4,011 bytes install ok: channel://pear.php.net/Archive_Tar-1.3.2 install ok: channel://pear.php.net/Structures_Graph-1.0.2 install ok: channel://pear.php.net/Console_Getopt-1.2.3 install ok: channel://pear.php.net/PEAR-1.7.2 PEAR: Optional feature webinstaller available (PEAR's web-based installer) PEAR: Optional feature gtkinstaller available (PEAR's PHP-GTK-based installer) PEAR: Optional feature gtk2installer available (PEAR's PHP-GTK2-based installer) PEAR: To install optional features use "pear install pear/PEAR#featurename"
A real example
As I am currently working on releasing the Kolab modules in Horde as PEAR packages I'll provide this process as an example.
In order to wrap a PEAR package the appropriate channel needs to be known for pear. For horde packages this is pear.horde.org. This channel needs to be discovered first:
# ~/pear-test/pear/pear -c ~/pear-test/.pearrc channel-discover pear.horde.org Adding Channel "pear.horde.org" succeeded Discovery of channel "pear.horde.org" succeeded
The initial package to be released will be Kolab_Format. PEAR packaging happens with
# cd Kolab_Format # ~/pear-test/pear/pear -c ~/pear-test/.pearrc package package.xml Analyzing lib/Horde/Kolab/Format/XML/contact.php Analyzing lib/Horde/Kolab/Format/XML/distributionlist.php Analyzing lib/Horde/Kolab/Format/XML/event.php Analyzing lib/Horde/Kolab/Format/XML/hprefs.php Analyzing lib/Horde/Kolab/Format/XML/note.php Analyzing lib/Horde/Kolab/Format/XML/task.php Analyzing lib/Horde/Kolab/Format/Date.php Analyzing lib/Horde/Kolab/Format/XML.php Analyzing lib/Horde/Kolab/Format.php Package Horde_Kolab_Format-0.9.0.tgz done Tag the released code with `pear cvstag package.xml' (or set the CVS tag RELEASE_0_9_0 by hand)
As most Horde PEAR packages have not yet been marked stable PEAR will still refuse to install the new package:
# ~/pear-test/pear/pear -c ~/pear-test/.pearrc install Horde_Kolab_Format-0.9.0.tgz Failed to download horde/Horde_DOM within preferred state "stable", latest release is version 0.1.0, stability "alpha", use "channel://pear.horde.org/Horde_DOM-0.1.0" to install Failed to download horde/Horde_NLS within preferred state "stable", latest release is version 0.0.2, stability "alpha", use "channel://pear.horde.org/Horde_NLS-0.0.2" to install Failed to download horde/Horde_Util within preferred state "stable", latest release is version 0.0.2, stability "alpha", use "channel://pear.horde.org/Horde_Util-0.0.2" to install Did not download optional dependencies: horde/Horde_Prefs, use --alldeps to download automatically horde/Horde_Kolab_Format requires package "horde/Horde_DOM" (version >= 0.1.0) horde/Horde_Kolab_Format requires package "horde/Horde_NLS" horde/Horde_Kolab_Format requires package "horde/Horde_Util" horde/Horde_Kolab_Format can optionally use package "horde/Horde_Prefs" No valid packages found install failed
The required packages must be installed manually first:
# ~/pear-test/pear/pear -c ~/pear-test/.pearrc install channel://pear.horde.org/Horde_DOM-0.1.0 downloading Horde_DOM-0.1.0.tgz ... Starting to download Horde_DOM-0.1.0.tgz (4,256 bytes) .....done: 4,256 bytes install ok: channel://pear.horde.org/Horde_DOM-0.1.0 # ~/pear-test/pear/pear -c ~/pear-test/.pearrc install channel://pear.horde.org/Horde_Util-0.0.2 Did not download optional dependencies: horde/Horde_Browser, use --alldeps to download automatically horde/Horde_Util can optionally use package "horde/Horde_Browser" downloading Horde_Util-0.0.2.tgz ... Starting to download Horde_Util-0.0.2.tgz (16,603 bytes) ......done: 16,603 bytes install ok: channel://pear.horde.org/Horde_Util-0.0.2 # ~/pear-test/pear/pear -c ~/pear-test/.pearrc install channel://pear.horde.org/Horde_NLS-0.0.2 downloading Horde_NLS-0.0.2.tgz ... Starting to download Horde_NLS-0.0.2.tgz (75,779 bytes) .................done: 75,779 bytes install ok: channel://pear.horde.org/Horde_NLS-0.0.2
This time installation should suceed:
# ~/pear-test/pear/pear -c ~/pear-test/.pearrc install Horde_Kolab_Format-0.9.0.tgz Did not download optional dependencies: horde/Horde_Prefs, use --alldeps to download automatically horde/Horde_Kolab_Format can optionally use package "horde/Horde_Prefs" install ok: channel://pear.horde.org/Horde_Kolab_Format-0.9.0
All that is missing now is to tell PEAR that it should provide PHP only with one include directory: the one we just setup. Ensure that you replace USER with the name of the current user.
# ~/pear-test/pear/pear -c ~/pear-test/.pearrc config-set php_bin "`~/pear-test/pear/pear -c ~/pear-test/.pearrc config-get php_bin` -d include_path=/home/USER/pear-test/pear/php"
After installation succeeded the unit tests should be run in order to validate the dependencies. If the tests are based on PHPUnit then this tool will have to be installed first:
# ~/pear-test/pear/pear -c ~/pear-test/.pearrc channel-discover pear.phpunit.de Adding Channel "pear.phpunit.de" succeeded Discovery of channel "pear.phpunit.de" succeeded # ~/pear-test/pear/pear -c ~/pear-test/.pearrc install phpunit/PHPUnit
And now we can finally run the last check before releasing the PEAR package:
# cd ~/pear-test/pear/tests/Horde_Kolab_Format/Horde/Kolab/Format/ # ~/pear-test/pear/pear -c ~/pear-test/.pearrc run-tests -u
"Gentoo Linux" as an e-book
The book is now available as an e-book, too.
In a way I'm still unhappy that it is not available as a free PDF. But on the other side that would be unfair to the amount of work invested by the publisher. It actually helps a technical guy like me to get the message across if there are people knowledgeable about writing helping in the process. I'm at least not that much into code that I am unable to judge the quality difference between what I can write and what I got back from OpenSourcePress.
Still, I retain the hope that it will be as free as the software I write at some point in the future.
Thursday, July 03, 2008
Installing PEAR packages from CVS
A short note illustrating how to install PEAR packages from CVS:
cvs -d :pserver:email@example.com:/repository login (PASS: "phpfi") cvs -d :pserver:firstname.lastname@example.org:/repository checkout pear/PEAR_Command_Packaging pear package package.xml pear install PEAR_Command_Packaging-0.13.tgz