As I was in Cusco the other week to hold a few speeches at a 3 days conference, I took the opportunity to go to Machu Picchu. This time, I managed to walk to the Intipunku (la Puerta del Sol, The Sun Gate) and take a picture from there, wearing my wonderful – but old now – Dokeos t-shirt from the 2005 User’s Day. It’s time someone offers me a new one, really :-)
And for those who think I look nuts… try doing a one-day-return trip to Machu Picchu and find the time, after the guided tour, to climb the 45 minutes stairs to Intipunku under a burning sun, and then we’ll talk!
Yes, sorry, I’m hiding half of it (in my defense, it was really though seeing it on the little camera screen with the bright sun beating down on me).
Here’s a better view
I’ve had a bunch of hunches recently about companies abusing the licensing terms of Dokeos by officially declaring (but only verbally so far) that their product (being Dokeos, but not officially) is not open-source software.
The GPL licensing makes it clear that the software derived from GPL software, or any alteration to a GPL software *must* be open-sourced, at least for the people it is distributed to. While I’m slowly starting to plan a series of legal actions, this is something I sometimes add to the bottom of my e-mails:
I’d like to take the opportunity to remind you that you are free to use the software, but that any alteration that you would redistribute needs to be made available to the people you distribute it to, and any application you would embed Dokeos into needs to be open-sourced as well. This is about the only restriction that applies to our software
but we are very strongly watching that everybody respects that. Of course, we welcome external contributions and will almost always integrate it into the main distribution, avoiding additional update costs in the long run.
It’s very sad to me to see that, with the amount of efforts we put into this software, some people still find ways to not respect the rules and selfishly profit from something that has been passed on to them along with responsibilities… This is clearly stealing intellectual property.
While I understand that some companies might have problems in their business plans with respecting the GPL (because they develop their own software and don’t want the source to be available to third parties), the rules of GPL are simple: either use it and comply to open-sourcing your code, or do not use it in the first place!
Acabo de escribir un post por mi blog en Inglés, que creo que sera de mucha utilidad aquí también. Hace mucho tiempo que quería escribir una hoja de ayuda de referencia para desarrolladores de Dokeos. Ya esta! Esta en Inglés, pero hay poco texto de toda forma. Descargenla desde el blog en Inglés: http://dokeoslead.wordpress.com/2008/09/29/dokeos-185-quick-reference-sheet/
It’s been ages since I first thought I should publish a quick reference sheet for Dokeos developers. It’s now done. It’s a first version but I think it will be really useful to new Dokeos developers. It is already useful for me (particularly for $httpHeadXtra and $htmlHeadXtra), so I don’t doubt that bit.
It is published under the Creative Commons BY-SA license (Paternity, Share-Alike) and I have the SVG format locally, so just ask me for it if you want to extend it. I might pretty well extend this sheet to specific class methods (like Database and Security) in the near future, but this is a good start.
When trying to upgrade WebCalendar to 1.2, I fell on a series of errors due to the fact that the upgrade script relies on a dependency to PostgreSQL 8.1, which allows much more ALTER TABLE syntaxes than PostgreSQL 7.4. Nevertheless, there are ways to make it work by updating the upgrade script a little to suit the new syntax.
I’m giving bits of code here, which are directly based on the www/install/sql/update-postgres.sql script, and altered to make it work.
This script can be executed manually as many times as you want with the PostgreSQL user you use for Webcalendar. Something like
psql -U webcalendar -W webcalendar < upgrade-postgres.sql
Please note that using the “postgres” user will inevitably create permissions problems that you might have to fix later using something like:
GRANT ALL PRIVILEGES ON DATABASE webcalendar TO webcalendar;
or something more specific if that doesn’t fix it.
The “TYPE” syntax error
On line 156 of the update-postgres.sql script, you will find the following query:
ALTER TABLE webcal_user ALTER COLUMN cal_passwd TYPE VARCHAR(32);
The ALTER TABLE – ALTER COLUMN with a TYPE constraint, however, is unknown in Postgresql 7.4, so you need to change this line. Here is the code I used to replace it (quite long as you will see)
/* Query in PG 7.4 form */
/*ALTER TABLE webcal_user ALTER COLUMN cal_passwd TYPE VARCHAR(32); */
ALTER TABLE webcal_user ADD COLUMN new_col VARCHAR(32);
UPDATE webcal_user SET new_col = CAST(cal_passwd AS VARCHAR(32));
ALTER TABLE webcal_user DROP COLUMN cal_passwd;
ALTER TABLE webcal_user RENAME COLUMN new_col TO cal_passwd;
VACUUM FULL webcal_user;
The VACUUM FULL command at the end allows for a complete memory clean-up which would otherwise not happen.
The UPDATE TABLE error for webcal_user
You will find the following lines around line 305:
ALTER TABLE webcal_user ADD COLUMN cal_enabled CHAR(1);
UPDATE TABLE webcal_user SET cal_enabled = ‘Y’;
This one is easy: the “UPDATE TABLE” syntax is not allowed in PG 7.4. You simply have to remove the “TABLE” keyword:
ALTER TABLE webcal_user ADD COLUMN cal_enabled CHAR(1);
UPDATE webcal_user SET cal_enabled = ‘Y’;
The NOT NULL constraint in webcal_entry_log problem
This one seems to be a real bug somewhere in the creation procedure for PostgreSQL tables. In fact, if you look into the tables-postgres.sql file, you will find that the webcal_entry_log.cal_user_cal column has a NOT NULL constraint, while in the equivalent script for MySQL, NULL values are authorized. This is tricky to fix (and uses the same procedure as the “TYPE” syntax bugfix above. In order to place it more or less in the right place, I have tried to put it around the same line as a query on the webcal_entry_log table in the upgrade-mysql.sql script (which is around line 75, or just before a comment talking about version 1.1.0).
/* Fix not null constraint in webcal_entry_log.cal_user_cal */
ALTER TABLE webcal_entry_log ADD COLUMN new_col VARCHAR(25) NULL DEFAULT NULL;
UPDATE webcal_entry_log SET new_col = CAST(cal_user_cal AS VARCHAR(25));
ALTER TABLE webcal_entry_log DROP COLUMN cal_user_cal;
ALTER TABLE webcal_entry_log RENAME COLUMN new_col TO cal_user_cal;
VACUUM FULL webcal_entry_log;
The webcal_nonuser_cals.cal_is_public missing column
For some reason, the cal_is_public field had not been created by the upgrade procedure, so I had to add it manually (I did that around line 200)
ALTER TABLE webcal_nonuser_cals ADD cal_is_public CHAR(1);
ALTER TABLE webcal_nonuser_cals ALTER cal_is_public SET DEFAULT ‘N’;
ALTER TABLE webcal_nonuser_cals ALTER cal_is_public SET NOT NULL;
The webcal_entry_repeats.cal_wkst DEFAULT constraint
Around line 240, you will find the following query
ALTER TABLE webcal_entry_repeats ADD cal_wkst CHAR(2) DEFAULT ‘MO’;
Because default values constraints cannot be assigned directly in an ALTER TABLE query, you have to split this line
/* Update to upgrade in PG 7.4 */
/* ALTER TABLE webcal_entry_repeats ADD cal_wkst CHAR(2) DEFAULT ‘MO’; */
ALTER TABLE webcal_entry_repeats ADD cal_wkst CHAR(2);
ALTER TABLE webcal_entry_repeats ALTER COLUMN cal_wkst SET DEFAULT ‘MO’;
You should now be alright with the SQL upgrade procedure.
You might (but this has *nothing* to do with the above) run into an encoding problem whereby the accentuated characters are transformed into little squares with question marks. This is generally due to the fact that Webcalendar only deals with ISO charsets, while your Apache configuration might be set to a default encoding of UTF-8. Make sure there is an Apache’s VirtualHost defined with an encoding of ISO-8859-1 if you are going to use this encoding.
I’ll be having two speeches at a free software event in Cusco these 24, 25 and 26th of September 2008. If you would like to meet us there, please get in touch beforehand by e-mail or a comment over here.
See the official announcement for more details
Nuestro equipo (Michela, nuestra relacionista pública, y yo) estará en Cusco los días 24, 25 y 26 de Setiembre para una serie de charlas sobre software libre y estándares.
Si es que ustedes quiere encontrarnos ahí para oportunidades de negocio o de desarrollo de proyectos, este viaje es una ocasión excepcional, porque es la primera visita oficial de Dokeos a Cusco, no duden en ponerse en contacto por e-mail o móvil (1 996574247).
Estaremos listos con unos contratos de instalación y de capacitación por si acaso.
Dokeos es una herramienta profesional de e-learning (capacitación en línea).
Más detalles del evento en el cual estaremos presentes: http://groups.drupal.org/node/14261