Bobulate

Home [ade] cookies

KOffice on OpenSolaris

January 24th, 2010

KWord on OpenSolaris screenshotInge Wallin recently blogged about the portability of KOffice — spurred on, no doubt, by the success of the port to the Nokia n900 and to Haiku. So he listed GNU/Linux, Mac OSX, Windows, FreeBSD (thanks, Inge, for checking), Haiku. That list is missing (Open)Solaris though, which as a UNIX flavor. ought to be a pretty simple target.

Of course, Solaris has been a primary target for OpenOffice for ages, so KOffice is a little late to the game on this particular platform. But I guess that’s my fault, since I’m one of the packagers for KDE4 on Solaris, and I hadn’t gotten around to it yet. So this weekend I spent a little under two hours hammering together a specfile (RPM-style) for koffice and getting the whole darn thing to build. Screenshot of KWord in action as proof. I tried KPresenter as well, but that crashed on changing the list style, so I didn’t think that was a good demonstration.

Of course, no port is without its patches, so here they are:

  • constness — this patch matches the constness of parameters in definitions with those in declarations, so that int foo(const int) is defined with int foo(const int i) and not as int foo(int i). Now, since the last time constness-matching blew up, I’ve learned that this is really a bug in Sun’s compiler, because constness is not supposed to be mangled into the name. However, I’ll claim that code neatness demands that they match, anyway.
  • double — some math functions like sqrt() can take both float or double, and Sun’s compiler doesn’t just pick one when you pass it integer parameters, so we need some explicit disambiguation. This is common all across the KDE codebase.
  • NaN — the KOffice code uses val != NAN which uses the gcc-specific NAN #define; probably !isnan() is better.
  • math — the header file math.h in Solaris uses the identifier “exception”, which becomes ambiguous in the context of the STL, so it needs to be included earlier, rather than later. This patch bungs in math.h as the first include in a number of C++ files — not necessarily something to merge upstream, because it’s mostly working around a bug elsewhere.
  • stupid — yes, this is a stupid patch. I can’t convince Sun Studio that 8.5 * 1440 is an secretly an integer constant and that it shouldn’t complain about a bunch of initializers in the MS Word import filters. I’m not really sure what’s going on here, it’s something special about static const initializers of class variables, since doing the same in a non-class context works just fine.

So there you have it. Five tiny patches for a codebase of a little over 600000 lines of code. Nice. Tip of the hat (I have lots of hats, but all of them are baseball caps and I don’t have a decent Stetson) to Inge and the KOffice folks for a nice portable office suite. You may be troubled, but your code is good.

On freeing a project

January 23rd, 2010

I saw over on LWN.net (a very valuable resource for technology articles, well worth your $5), that a RAW picture editor called RawTherapee had been re-licensed from Freeware (gratis, but proprietary) to Free Software, under the GPLv3. The application is something I won’t use myself, and I can’t even manage the comparison to DigiKam (which I don’t use either). Technologically it looks quite cool, from the cmake-based build (yes, having a build system that supports cross-platform development effectively can be a wonderful thing) to the (comprehensive and multi-lingual) ODT manuals. I miss the nice KDE reporting of missing dependencies summarized in a list at the end, though. Something to contribute, over there.

The author, Gábor Horváth, states some interesting reasons for freeing the whole thing; I personally think the “family” argument is the strongest one, and it’s important to spend time with your (small) kids. Of course, at 10 months you can still code with the baby on your tummy. The other motivations are largely a matter of growing the community of developers and contributors in order to get better coverage of all the aspects of development (GUI, documentation, algorithms, translations) and smoother development by not depending on a single individual. All good reasons, to be sure. Whether these are good motivations to choose GPLv3, I don’t know (over some other copyleft license that encourages community building).

I’m going to admit a very non-charitable reason for looking more closely at RawTherapee: I was intending to bitch and moan about the state of the source code and the licensing and then point out how it should be done, by gorm. Instead, I can point to RawTherapee (as of SVN revision 31) as an example of a Free Software project done (pretty) well:

  • (good) Clear license choice; although the license is in a file called “copying” instead of the canonical “COPYING”, it’s the complete text of the GPLv3.
  • (good) Every file has a complete copyright header, including sufficient license text and an identifiable copyright holder. As the project grows, it will be interesting to see if it manages to keep a good grip on its contributors — that is, if everyone who adds a copyrightable contribution to the code actually adds a meaningful copyright holder line to the file headers. This would be, roughly, clause 5a of the GPLv3.
  • (bad) The distribution from SVN includes a few pre-compiled libraries (jpeg, lcms, png, tiff, z) for windows and accompanying header files. Of that lot, jpeg doesn’t mention its license terms in the file header (but refers to a README that has been lost). I hunted down the relevant source distribution, and the README contains a license that stipulates that README must be included with the distribution if any source is distributed. Right, minor point, but something to clean up in a next release — although I’d like to think that it also illustrates that the license in the jpeglib header should be clearer. lcms is MIT licensed, the png license doesn’t seem to allow binary distribution at all — the permissions it gives are for source. On the other hand, the use of the code as a component in a product is encouraged — that suggests binary use is ok, but it’s not exactly explicit. Tiff is MIT again (when I say “MIT” I mean “Simple permissive 1-clause, possibly with a restriction on endorsement”) and libz is also permissive. So just one minor blot.

Anyway, a tip of the hat to Gábor for doing it right (and doing the right thing) and I wish him lots of success with his project.

*sniffle*

January 23rd, 2010

Last week I was in Berlin, and besides getting some work done, picking up some espresso beans and meeting old friends, I also received a wonderful German cold bug. From my boss Karsten, presumably. We all know that parents of small children are plague-bearers, but his kids are apparently in a different pathogen group than mine — as a result of which I’ve been pretty much laid-up all week with sniffles, headaches and the like. I can focus for about 2 hours at a time, after which it’s back to bed. I don’t recall colds hanging around this tenaciously or virulently before; the only good thing I can say about it is that 2 hours is enough time to write blog entries on random legal and licensing topics (and also technical KDE things, but that’s coming up).

Overcompensating

January 22nd, 2010

Overcompensating is a webcomic (that one is safe for work) which I’ve been reading for years. Patently-O is a blog about patents which I read occasionally — I must admit that my interest in comics pre-dates my interest in patents. It (Patently-O) has a link up to a guide to patent damages. I’m not going to recommend to people on PlanetKDE to read it in particular (PlanetFSFE, maybe), but a few things struck me as I paged through it: one, that it’s remarkably readable, for a document produced by the legal profession; two, that it’s a practices guide that is quite concrete in what needs to be done and how things are handled; three, that it doesn’t talk about non-commercial infringement at all, as far as I can tell.

Since patents on software implementations of algorithms and the like continue to be granted in the US — witness HP’s patent on choosing a number base for a given processor or Google’s patent on map-reduce (apply a function to items in a list, then aggregate) — understanding the potential end-results (damages when infringing) is a big deal.

A cake for Shaun

January 20th, 2010

Well, Shaun, here’s a chocolate cake for you. it’s very similar to the pecan cake I wrote earlier — but closer to the “ultimate chocolate brownie” recipe that I based both off of.

Chocolate cake for Shaun: Mix three eggs and a cup of (brown or cane) sugar and a tsp. of vanilla extract and a pinch of salt for 10 minutes on high with an electric mixer. Alternately, show the world you’re amazingly buff with a hand whisk. Optionally add chopped nuts. Stir in 100g melted pure chocolate (that’s 4 squares in North America, I believe). Sift one and a quarter cups of flour with 2 tsp. baking powder and sir that through the wet ingredients. Pour into a 9″ round pan and bake for 30 minutes at 350F or until a fork comes out clean. Frost with a mixture of icing sugar and powdered cocoa and afew drops of water (if you’re into frosting, that is).

License Badges, 0.7 version

January 19th, 2010

I’ve added some bits and pieces to my badges-for-licenses scheme, mostly based on comments received from readers. Most notably, I’ve added the LGPL, added links to the license texts, twiddled the CSS a bit, added mouse-over warning messages to those licenses that deserve a warning, and improved the description of some of the badges. What still needs doing — and I wonder how to achieve a good balance between having an overview of licenses that is short enough to be readable, and the subtleties of licensing reality — is writing up a good piece on how these badges reflect the most important pointsof each license, but do not state the complete effect of each license (unlike Creative Commons licenses, where each set of icons maps to one set of license terms).

The next round of updates will basically be adding more licenses, improving some of the icons, snazzing up the presentation a bit and importing the whole thing into the FSFE site. That’s for just before FOSDEM, I think.

Free (as in Speech)

January 18th, 2010

The Netherlands has a “dichter des vaderlands”, a national poet. I don’t know if that would be comparable with a British poet laureate — perhaps because the Dutch one is primarily a product of a single newspaper / publisher. The conservative one, at that, but the national poet is tasked with doing whatever poetry demands. A little like a national ombudsman, I suppose. The current holder of the title is Ramsey Nasr, and his latest foray starts with (loosely translated): “So, Mr. Premier, how does it feel to lie // and then to see the same in print?” The Dutch version refers to the premier by his initials, JP. I’d pin this up as a testament to Free Speech in this country.

Another note on dual-licensing

January 13th, 2010

I recently wrote about the FreeType license and its double license and why it was necessary. It’s an interesting situation (for FreeType itself) because there’s the GPLv2 and a second Free Software license involved — the FTL, which is basically a 3-clause BSD license with attribution required.

Often, though, when we talk about dual licensed we mean a situation where one license is a Free Software license and the other is a fully proprietary one. Bear in mind that the 3-clause BSD license allows proprietization as long as you satisfy the attribution clause and the license distribution clause, so it’s not a world of practical difference, but one of intent. The suit filed around Palm’s PDF viewer on the Pre illustrates the effect differences of intent can have.

One way you can look at dual-licensed software is that you have “the usual license” (which in our context is a Free Software license, probably some version of the GPL) and that for some users who cannot abide by the terms of that Free Software license, you sell exceptions. Richard Stallman writes on the subject — I found it via groklaw, where also one of the first comments uses the phrase “selling indulgences,” which I think is much more evocative.

So the point is that if you are the copyright holder — the sole copyright holder, because you need to have the right to re-license the code — then you can sell an indulgence to someone who cannot abide by the Free Software terms, but whom you consider worthy to use the software nonetheless. Yes, that’s plenty subjective. My phrasing is also slightly wrong, because you don’t have to be the sole holder: there are other ways of ensuring that you can grant the indulgence even with multiple rightsholders (a contract or license grant would do). In any case: you can do this for specific reasons while still supporting and producing Free Software.

This is also RMS’s pragmatic point: while the FSF does not follow this practice, that doesn’t mean others cannot while still being “ok”. And I think that’s good news for GPL’ed libraries out there. For users of GPL libraries, bear in mind that intent matters, and that the GPLv3 offers a grace period that the GPLv2 does not — and that might be important when dealing with entities whose intents are not entirely clear.

Terms of Service

January 12th, 2010

The terms of service of a website vary from the stupid to the sensible, from short to very lengthy. The Facebook terms, for instance, have been re-worked in an attempt to be plain English and are very wordy indeed — but not stupid. No, stupid is a website with terms saying “This file may not be downloaded from this site.” Imagining (if you have any technical knowledge at all) how someone can come up with that is likely to leave you with a sprained hindbrain. Not recommended.

Now, it’s sensible to read the terms of use of a website; but not necessarily mandatory. Often there’s a checkbox saying “yes, I have read the Terms and Conditions” (with a link to the T&C). You can still check that without actually having read the legalese. Perhaps a setup where you must click on three randomly chosen highlighted terms in the T&C text before you can continue would improve matters? In any case, you don’t necessarily have to read the T&C, so have you really accepted them? Ars Technica reports on a recent court decision that says that the terms are enforceable even if you haven’t read them. There’s some limitations there, on the reasonableness of the terms and I imagine that a lot depends on how the T&Cs are used. Via Ars you can end up at two different reports at TechDirt, one for enforceable and one for non-enforceable. In other words, the jury (ha!) is still out on this one, but it’s worth keeping in mind when designing a site with a click-through agreement.

The FSFE sites have no user agreement (this is something we should fix, actually, since we both provide a service and publish user content). KDE’s UserBase has Guidelines and a code of conduct, which don’t cover all the bases, but it’s a start. Gitorious has something that looks a lot more like traditional terms of service — one might argue at some point whether not-reading those terms allows one to escape from the choice of venue, in light of the two court decisions listed above.

Upcoming Conferences

January 11th, 2010

LinuxTag in Berlin is one of the recurring and very fun events, both on the community and business sides of the Free Software equation. The call for papers is open until the 29th of January. The NLUUG spring conference on systems administration has a call that is open until tomorrow, but tends to be somewhat lenient in the submission deadline. I think it would be cool to have a talk on “Konsole as a sysadmin tool”; I don’t think general Free Software talks fit the bill all that well. There will probably be an FSFE stand at the conference, though, to talk about licensing and the importance of Free Software in sysadmin tasks, even if it’s not an all-that-obvious fit for the conference theme.

Though the call for papers closed a long time ago, you can still attend CampKDE starting on Friday. This is the North American get-together of KDE developers and users, in San Diego this time around.