Search Results: "tg"

4 March 2010

Adrian von Bidder: Geek Quiz

Q1: Which programming construct is closely linked to Apple? (No, customer lock-in is not a programming construct.) Q2: Find the birthdate of one of the PostgreSQL developers and find out who it likely is. Q1 should be trivial. My answer to Q2 is not verified, so this is more a quiz of do you think the same. Both answers are found on the web.

3 March 2010

Andreas Barth: Changes in wanna-build

During recent weeks, not only sbuild and buildd were changed, but also wanna-build. Many changes were small and don't have direct impact, but will ease our life in future. This includes a bunch of code cleanups. Most changes were done by Kurt Roeckx and me, but as usual Marc Brockschmidt and Philipp Kern were also involved. This round of changes was started with redoing our priority calculation. Up to now, any package had a fixed place in the list, and our list was built from top to bottom as far as buildd power was available (putting aside manual intervention by setting build-priority by admins). That meant of course that some packages could be stalled if buildd time isn't enough anymore, like currently on mipsen. (The queue order was determined by the following sort options: build-priority, (>= standard?), already built in the past, priority, section, name, and the first difference decided list order.) Now, of course >= standard packages are still built first, but waiting days increase priority so that old extra packages could be built before young optional package (in other words, they shouldn't stall. The new formula is about: required: 50, important: 40, standard: 30, optional: 5 [priority] + libs: 4, devel: 2 [section] + contrib: -20, non-free: -40 [component] + out-of-date: 20 [notes] + max(6, waitingdays) * 2 + manual priorities, and packages are ordered by this number, then by waitingdays, then by name.) While adding code to add bonus for long-waiting packages, we stumbled across the fact that there were non-C dates in the database stored, which in turn means that export of the database stopped to work. For fixing that we replaced the last change field in the database by an postgres now() on insert, and converted that field to an date field (instead of freetext). Which in turn broke mkstats and a few more things, which are fixed as of now. While doing that, we also introduced the format option, which allows to do queries like:
wanna-build --format='%t %u: %p/%v% +b B%B' -A mipsel --list=building
which gives output like:
2010-03-03 15:24:38.642988 buildd_mipsel-mayer: cracklib2/2.8.16-1
2010-03-03 15:30:00.341313 buildd_mipsel-rem: liblouisxml/2.1.0-1+b1
Of course, there are even better possibilities what one could do with that. :) More changes are pending, like the injector for log files was changed so that we record building times in the database. This will allow us to include build time on at least a few buildds, so that large packages cannot so easily stall all buildds completely anymore. So, more to come ...

Jonathan McDowell: Meta: Rant about rants about PGP keysigning problems

(This has ended up longer than I intended, largely because I felt I should then get into why. I'm aware I haven't got into all the nuances, so I hope readers familiar with the area will appreciate this is the compact version.)

Thorsten had a rant last week about PGP keysigning problems. He apologises for his tone, but that's not the issue I take with his rant.

It starts "Keysigning is useless". And yet his complaints seem to be:

None of these seem to actually be about keysigning being useless. The process of doing it, maybe, though he misses the main valid rant about this I'd have, which is that most mass keysignings don't actually allow you to accurately verify the identity of other participants unless you already know them reasonably well. (The LCA2010 keysigning and DebConf5 in Helsinki spring to mind as 2 good examples of bad keysignings I've attended, but speaking to others suggests it's far from an isolated thing.)

Torsten does say that he'll continue to do keysigning on a per-person basis, so it doesn't sound like he's completely given up. I'm posting this largely so other Debian related people don't get the idea that it's not important to think about keysigning.

Why should we care?

Firstly, let's clarify what I mean when I sign someone else's key. If I sign your key then I think that I believe you hold the private part of a key that has your name and an email address I believe I can use to contact you on it. It means I have seen government issued ID that matches that name. It also means that I have interacted with you (and watched others interact with you) under that persona. In short I am happy that the key is a reasonable digital representation of your identity - something signed by it either comes from you or has involved the key being compromised or you coerced into using it against your will.

Why is this useful?

It gets useful thanks to the web of trust; ie the idea that there are a bunch of people I trust partially to sign other keys, and if enough of them have signed a key then I can have a reasonable expectation that the key belongs to the person I want to talk to. Which means I might be prepared to send private data to them. Or Debian might be prepared to accept an upload from them. Which, when you're dealing with a community that spans the planet and where most of the contributors haven't met each other, is pretty freakin' useful - I, as part of Debian's keyring team, don't need to personally be able to identify every Debian developer. All I need to do is be able to trust other DDs to be able to do so. (Though maybe I'm missing out on something here - perhaps Debian should be paying for Gunnar and me to travel the world verifying fingerprints. \o/)

(I still do mass keysignings btw. I'm picky about which keys I actually sign - this is in no way intended as a slight against those I don't, but a mass keysigning at least lets me know that the people involved are happy to exchange fingerprints. Though, FWIW, I normally have ID on me and frequently have fingerprint slips, so if you know me and want me to sign your key/want to sign mine then by all means ask me when you see me!)

Thorsten Glaser: CLI for the KDE Wallet 2.02

The Command-Line Interface for the KDE Wallet, Version 2.02, has been released and dput into Debian unstable. (The lenny-backports version will follow.) It took me quite a while to reproduce, then track down, the bug; having unrelated problems at the same time didn t help either

28 February 2010

Siegfried Gevatter: Zeitgeist Data-Source Registry

This post is about an upcoming feature in Zeitgeist 0.3.3 and is so far only available in checkouts from trunk or our PPA. It is expected to be released within the next weeks. Some weeks ago I implemented a new feature in Zeitgeist and I figured I d drop some lines about it. I m talking about a data-source registry. You may be wondering, what the hell is that even, a data-source? . So Zeitgeist is a database, a global event log, but it doesn t do any magic indexing or monitoring by itself; the information it logs needs to come from somewhere be it applications sending it to Zeitgeist themselves, daemons, plugins for applications, etc. Any such entity is called a data-source . Having a register of all data-sources interacting with Zeitgeist provides some benefits, like for example:
Screenshot of tools/gtk/zeitgeist-data-sources-gtk.py

Prototype of a data-source management user-interface

More details When they register, data-sources will need to provide the following information: an unique ID, a name (may be localized), a description (may be localized) and optionally a template specifying what sort of events it logs. Additionally, the last timestamp the data-source was seen by Zeitgeist, whether it is running right now and whether it is enabled will also be available. It is important to note that registration is not compulsory; while it is highly encouraged for data-sources to use it, is it still possible to anonymously insert information into Zeitgeist (for example from a shell script). The event template is also only informational, and will not be enforced by Zeitgeist at this time. Avoiding duplicates from GTK Recently Used You may know that zeitgeist-datahub provides basic support for applications which have no direct Zeitgeist support but do use GTK s RecentManager, which is not as detailed as we would like, but it is better than nothing. However, until now we had a problem: when applications had support for both, GTK s Recently Used and Zeitgeist (be it native or as an extension), it was possible for duplicate events to be inserted or other sorts of conflicts between both data-sources. Now that we have the information from the registry available, we ve been able to solve this modifying our Recently Used data-source to ignore any events concerning applications which already have another data-source logging the same types of events.

In case you don t care at all about what I m talking here and you just want to see fancy interfaces, go check this out. Related posts:
  1. Zeitgeist is out!
  2. Introduction to Zeitgeist 0.2 s API
  3. Zeitgeist Hackfest (II)

No comments
Siegfried-Angel Gevatter Pujals, 2010. Permalink License Post tags: , ,

27 February 2010

Biella Coleman: Lazy Web: South Park Scientology Video

update: success, I got a copy. This means by talk will be that much better. Thank you all! So I am giving for the upteeenth time (but I am going to retire it!) my talk on Anonymous and Scientology next week and I have decided that I want to show a clip from the South Park episode on the topic - Trapped in the Closet Season 9, Episode 12 (Original Air Date: 11/16/2005). I made the mistake of buying it on Amazon cuz it is super DRM-FSKCING-ED and I can t play it on Linux and I don t know how to crack it. Anyway I also want to cut it to the relevant part, which is the wonderful history of Scientology. Does anyone have a copy free of DRM? Or point me to where I can find one? This is within the purview of fair use, given that I am a serious academic giving serious attention to this topic :-). Any help or pointers appreciated!

26 February 2010

Andrew McMillan: DAViCal 0.9.8.3 - A return to stability

After a whole bunch of drastic changes, lots of bugfixes, rewriting and refactoring, I released DAViCal 0.9.8 on Christmas day last year. I didn't release it very publicly, because I knew it sucked significantly. In an increasingly fast turnaround I've subsequently released 0.9.8.1 to a somewhat wider audience while I was at the recent Calendaring and Scheduling Consortium meeting in Costa Mesa at the beginning of the month. Earlier this week I released 0.9.8.2 to the more interested of the DAViCal userbase. So finally, yesterday, I released DAViCal 0.9.8.3 to fix the few significant problems that were left with that, and this is the release that I'm telling everyone about, because I believe it should be a good stable platform to people who want to upgrade their production DAViCal servers, or who have been hanging back from using DAViCal until the platform was a little more stable.
<!--break-->
This release marks some significant departures from previous DAViCal. I've decided to walk away from some of the more ancient legacy software I tried to work with in the past (PHP4 & PostgreSQL 7.x), to move to support the most ancient-but-not-superseded legacy Linux release I know of, which is CentOS / RHEL, so DAViCal now has a minimum requirement of PHP 5.1 & PostgreSQL 8.1. The biggest changes to DAViCal are under the covers. It is server software, after all, so the largest changes often are not visible on the surface. What has changed is that the architecture for constructing responses as been refactored into a core object which is used to access any DAV resource in the system. This greatly simplifies the general coding and reduces a fair bit of code duplication which had been happening. Another long overdue change is to get rid of the old arcane & obtuse permissions model, replacing it with something which will be radically faster in installations with more than a few hundred users, as well as being more consistent, easier for people to control, and directly in alignment with the DAV ACL specification. Some of the work here was assisted by NZ Registry Services who gave me a Macbook to help with my compatibility testing. Not all of the changes are under the covers though. The new DAViCal also has a thoroughly revised administrative interface, and over the last couple of releases I've gone through the system trying to uncover all the places which were not properly localisable, too, so if you see DAViCal displaying strings in a language you didn't configure it for, it should be a fixable thing. I'd like to particularly thank Masahiro Mikami for turning around some Japanese translations very quickly which enabled me to quickly and visually see what was not properly translatable. There's still more work to do (there's always more work to do) but a fully translated DAViCal should, I hope, be quite usable by non-English speakers now. The new DAViCal also supports some rather significant extra functionality beyond the CalDAV standard, in particular we can thank Rob 'Cave' Ostensen for providing an implementation of pub/sub event change notifications. This version also supports draft 2 of the proposed WebDAV synchronisation standard - that's still under development, but we expect to track pretty close to released versions of that. Of course with all of this work there are some areas that didn't get changed. I didn't manage to finish an implementation of the scheduling extensions draft, much as I would have liked, but that is going to become very much a focus in the coming couple of months, and I'll be calling it "1.0" when things settle down after we get that done. Other things I will be working on include a ticketing system for providing targeted, controlled access to a specific collection or event, and making a start on CardDAV support for addressbook storage. DAViCal seems to be fitting a need for people, and I know there are several thousand installations around the world, even if I'm not sure where they all are. I know some people are running DAViCal on their 8-way server, where I've no doubt it gurgles along pretty happily, and that there are some people running it on their OpenWRT installation, with some tiny amount of resources - just enough for a family calendar. Traffic on the wiki has increased to several hundred thousand hits per month, perhaps three times what it was a year ago, and I hope that I can continue to provide a valuable and useful piece of infrastructure for that little calendaring corner of your organisation. What heartens me the most in this ongoing experience is the nascent community that appears to be forming around my software, with people writing 'tip sheets' and helping to answer questions on the IRC channel and mailing list. These small contributions made by many people - people whom I have never met, for the most part - are enabling me to put more time into feature development and expansion, and that's what I really love.

23 February 2010

Thorsten Glaser: Rant about PGP keysigning problems

Update: This wlog entry uses aggressive tone because I somehow needed to vent frustration from using some of the tools. I should probably provide some constructive critics, too... but this is a rant. Be warned. Keysigning is useless. I boot up a suitable live GNU/Linux system, install signing-party, take the trouble that is to set up caff, transfer my secret key from the secure box, sign. I think caff providing the keys in a different order than they're given on the command line sucks and just run caff once per key. I did even start Postwreck. But no, people just don't accept any mail from "EHLO grml" systems, and I still cannot control my reverse DNS despite having a static IPv4 address (and IPv6, which looks to be unused). People also pretend I'm on dial-up. Great! I will no longer participate in any (mass) PGP keysigning but will continue to do so on a per-person basis. Probably sign but one uid, either apply common sense and upload it to t h e keyserver, or mail the entire signed key to one address. By the way, how crazy is it that I need to use the deprecated $CONFIG 'mailer-send' to pass an envelope-from to the mailer? It also suffers from the same delusion as e.g. nmudiff, namely that my Debian box is a fully set up workstation able to send out eMail and configured correctly. At least, it, unlike a number of others, does not assume I use mud (Mutt). grml Oh, and caff does a protocol violation (by always sending out GnuPG/MIME and not offering the standardised Inline OpenPGP), I think people just don't care about such. (There is a notation people can use to signal they want PGP/MIME, Inline PGP which is called "partitioned" or both (and which order of priority) but, alas, despite Inline PGP being the only one useful for the MUAs without integratin, and being more widely spread than that PGP/MIME crap, the followers of the latter do some (FSF-style?) kind of vendor lockin by not speaking anything else. Anyway. I'm all for X.509 except there seems to be no sane CA (Startcom is... trouble, even with Opera; CAcert.org is dying). I'll just buy a certificate (not from Verisign though) for www, and roll my own again (I can do it, I have experience with that actually). On an unrelated side note, still waiting for an OpenSSL patch for that recent TLS extension... ObRant: password policies, be they required characters or any kind of length restrictions, suck. People I will eventually end up with less secure passwords on such systems, because even if some of mine may appear to be derived from some kind of dictionary (what language that is I'd be interested in, though...) they aren't, and I have my schemes. You got to have them with a gazillion of passwords used. And I probably will forget them more often (and sending them via eMail is also not a solution). Unrelated notice: mksh R39c with bug fixes coming RSN. (Updated 24.02. because I was, rightfully, told the language, and the title, were too strong. I also would like to excuse for going so low as to write an ad-hominem attack, which I've since redacted.

19 February 2010

Gustavo Noronha Silva: WebKitGTK+ testing

Most times when I blog about WebKitGTK+ it s to talk about new features, and their usage in Epiphany. This time I d like to tell those who care more about our test infrastructure. Like I said in my previous post, testing is something we take very seriously in WebKit land. It would be hard to get such a complex project, with such diversity of platforms moving forward without automated testing. Apple hosts a buildbot master that controls a whole lot of build slaves, for many platforms. Today we added the fourth WebKitGTK+ build slave to the family: 64bits release. This makes up for 4 build slaves in total, 2 release bots sponsored by Collabora, and 2 debug bots sponsored by Igalia. These bots build WebKitGTK+, and then run what we call the layout tests . I use quotes there because the name is a bit misleading. Despite being HTML/JavaScript tests, they cover a whole lot of functionality, and tests for regressions in many areas, including security, crashes, animations, media playing, DOM behaviour, and javascript API behaviour. WebKitGTK+ bots currently run 6397 tests, which represent about half the available tests. Our bots are also, as of today, the first ones to run platform-specific API tests. Almost a year ago we started writing small tests based on glib s GTestSuite, and they have been very valuable in helping us make sure our API expectations aren t breaking (at least unknowingly), and to be able to test things that would be very hard to have Layout Tests for. So, yay! Thanks to everyone involved. Back to layout tests, now: the other half is currently skipped because of one of three main reasons: The first one is the worst of all. It means we have broken functionality, or lack web compatibility. The second one is less bad, we can usually trust layout, and rendering to be good because most of the rendering code is shared (thought there are exceptions, of course). Render dumps are a special way of representing the render tree as text, and we need to generate our own results because of differences in things such as font sizes. The third one is also pretty bad - it means we cannot test some features; DumpRenderTree is an application that uses the port s API to run the tests, and provide additional JavaScript API through JavaScriptCore. If you feel like helping WebKitGTK+, choosing a bunch of these (specially non-render-dump) skipped tests to make them pass could likely be a good first step =).

16 February 2010

Jan Dittberner: New hardware for my server at home

After some stability problems and an unresolvable PCI IRQ problem with my Debian server at home (Internet gateway, mail, PostgreSQL, LDAP and NFS server and test system), I decided to get a new mainboard and wireless card last week. I did some research to get hardware that is properly supported and where I can use the rest of my current components. I had So I had to find a mainboard with at least 2 DDR2 DIMM sockets, an AM2 compatible CPU socket in ATX format with SATA ports at least one IDE Port, a Gigabit ethernet port (serving NFS home directories) and at least 2 PCI slots (one for the wireless card) that is well supported by the current Debian Squeeze Linux kernel. As I had some issues with the previous board's nvidia SATA chipset I wanted to get something else that is AHCI compatible. After some research I decided to buy a Gigabyte GA-MA74GM-S2H (rev. 3.0) which is available for a good price and fits all my criteria (2 DDR2 DIMM slots, 6 SATA ports, an RTL8169 based Gigabit ethernet ports, 2 PCI slots, ...). The mainboard uses an AMD 740G + SB710 Chipset. It has an integrated graphics chipset which I don't really need because I run the machine as a headless system. As I use the server as a wireless access point I need a wireless network adapter that supports AP mode. There are not many chipsets that are properly supported in AP mode and allow good data rates so I decided to get an Atheros ath9k based card, because I don't need non-free firmware like with broadcom based cards and could find some affordable hardware. The previous was a Netgear WG311 ath5k card that had issues that it lost its connection under more than minimum load and could only be reanimated by a system reboot. I looked at the Linux Wireless pages and found out that D-Link has a matching adapter the DWL-G520. Unfortunatelly they don't tell about the used chipset (as almost all other vendors too) and write about possibly changing hardware at the product sheet. To be sure I looked at their Windows driver's .inf files and found nothing indicating that there are any non Atheros variants of the card. I also ordered two Fantec MR-35 SATA mobile racks for more comfort when one of the RAID1 discs crashes (had 2 crashes last year) and a 12" chassis fan to keep the system cool. Today the package arrived and after unpacking and putting everything together I started the system (with keyboard and a display attached) to see how it works. All hardware was automatically detected by the current Debian Squeeze system and I only had to remove the entries for the old onboard network adapter and the old wireless adapter from /etc/udev/rules.d/70-persistent-net.rules and fix the device names for the new network cards. I added a new stanza for the Intel ethernet adapter in /etc/network/interfaces and setup a set of ferm rules to have a working firewall (thanks to Formorer for the suggestion to use ferm). After this was finished everything worked fine so far and I put the machine at its normal place without keyboard and display. To verify that the stability situation had really improved, I copied some huge files over the network (both wired and wireless and in both
directions). Afterwards I did a bonnie++ benchmark to test the SATA and hard drive reliability. Everything went well and I'm happy with my investment.

15 February 2010

Gustavo Noronha Silva: WebKitGTK+, and the Page Cache

So, one of the things I get to do during work hours for Collabora is to contribute code, and do maintenance tasks for WebKitGTK+, and have been doing so since early last year, working on all kinds of things, from improving the network backend to handle the real-world web, to fixing scrolling problems, while reviewing patches from the many awesome developers who have been joining us (more on that later =D). One of the big features I have worked on this past month or so, along with Xan Lopez is the Page Cache. The page cache is a feature of web browsers that makes going back, and forward between pages in the same view very fast. It s better explained in this post, but to summarize, the idea is that instead of destroying all the work you have done since downloading the resources, and having to reparse/rebuild the structures the view uses to display the page from the cached resources, you hit pause on the page, and store the whole thing as is, and when coming back to it, you just hit play. You can see in the video two instances of Epiphany, one with the page cache enabled, one with it disabled. Easy to see which was has it enabled. Thanks to KiBi for the suggestion regarding a page that shows this easily =D. <video controls="controls" height="302" src="http://kov.eti.br/media/webkit/page-cache.ogv" width="450"></video> We initially thought we had this feature enabled, since our initialization functions (that exists since before the current maintainers were involved) did setup the number of desired pages in the cache, but during the hackfest we held in December we found out we were fooled all this time. Enabling the page cache does make going back faster, but also made lots of things become unstable and crash. Since then, we have been working on figuring out all the problems, and fixing them, using help from adventurous users of in-development software ;D. I believe we re now at a point in which I can happily declare the GTK+ port has a working page cache in trunk! If you re interested in the nasty details, bear with me! Let me go back in time a bit, and show you what problems we had. First, some background: the GTK+ port deviates a lot from the other ports when it comes to scrolling. This is because, when designing this part of the port, Holger Freyther had a very nice idea in mind: that the WebView should be a first-class citizen GTK+ scrollable widget. Meaning it would use GTK+ s adjustments for scrolling, and be able to interact with any parent scrolling widget, be it a GtkScrolledWindow, or a MokoFingerScroll. We cannot just throw away all the rest of the scrolling code in WebCore, though, that deals with all the details related to interacting with the DOM, and JavaScript code. This means our WebView contains adjustments that need to be set, and unset on our port s version of WebKit s own representation of the view, called the FrameView, to interact with it, and to get updates on the bounds of content, and such. For every load, in the non-page-cache case, a new FrameView is created, the previous one is destroyed - this means we need to set the adjustments on every load. The problem starts when you have the page cache enabled, because the code path used to do what is called commit the load of a cached page (that is, start replacing the content that is currently being displayed by the one that should now be displayed) is completely different, and we were not setting the adjustments on this new view, so we started with that. But all was not well. We were still having weird behaviour with scrollbars disappearing, and becoming the wrong size, and worse, crashes when back was hit. We then started investigating in more detail how it is that the page cache does its magic, to try and figure out the source of all evil. It turns out that when you leave a page that can be cached, the existing FrameView is no longer destroyed - it is stored as is in a CachedFrame to be restored if you go back, and a new one is created for the new page. This was having the undesired effect of having the adjustment be set in more than one FrameView at once, causing all kinds of (predictable, after we knew for real what was going on) unwanted effects. Thus, we reworked the code to make sure the adjustments are only ever set in one FrameView at once, making sure they are unset when the FrameView is being frozen, and reset when it s being restored from the page cache. Last, but not least, it was discovered that going back to a page that contained resources with data: URIs (such as Google results pages which contain a small number of image hits) also caused a crash. This was because our network backend was not storing the data: URI in the ResourceResponse objects it fed into WebCore. The page cache relies on those responses to recreate the requests it uses to artificially replay the load when restoring the page from the page cache, so we fixed that as well. What can be taken from all this? Building browsers is a lot of hard work! I can t think how we could deal with this level of complexity without the awesome testing suite of WebKit. The good news is all of those issues I talked about in this post are now covered by the automate tests that run as part of the normal buildbot cycle in our bots, so we re covered for the future, at least for these specific problems =D.

12 February 2010

Sandro Tosi: This RRD was created on another architecture

That is the message you'll receive when trying to open a RRD database created on a 32bit machine from a 64bit one (it's also true the reverse). It's due to the fact that RRD is an architecture-dependent file format: endianess and integer bits length matter.

That's quite boring, given it's quite common to let each machine generate its own RRDs and graph them from a central place, and the more machines you have, the more chances of the above problem.

So, for another example, if you migrate one machine from 32 to 64 bits, you'll have to:
as described here. And when you have +4GB of RRDs it's not so painless.

So, can we haz an architecture independed RRD file format? Pretty please?

It was planned for 1.4, and now that 1.4 is release it's planned for 1.5. Let's hope it comes soon, it would be really nice! :)

5 February 2010

Thorsten Glaser: FOSDEM 2010, day #0

Yesterday, I arrived in Bruxelles, coming from the Issy/Paris FusionForge meeting which will be described more later by Roland on Pl net Forge. Please tell Ohlol if you use it, for more visibility. My employer will also provide hosting for FOSS projects, but we'll need to formalise the hosting conditions first, plus Evolvis currently runs FusionForge 4.5 (aka "Debian GForge") but we're in the process of upgrading to a 4.8-plus-backports-and-patches, then 5.0 soon. There is a new inter-forge mailing list as well, see the info page. People from Coclico and the various *forges may want to subscribe there (forge developers, not so much users (hosters) or end-users (hosted project developers/users) though). At FOSDEM, Benny and I (and maybe gecko2) will be running the MirBSD booth, so no Debian staffing for me, sorry. But I will be there. Also please do ask me about mksh the MirBSD Korn Shell etc. There are flyers in German (not updated), English and French too! (One of the *forge guys did install mksh(1) after reading it, in fact.) Don't you people dare miss the two talks: from Benny about how to package with autotools and libtool correctly and from XTaran explaining Debian GNU/kFreeBSD. Benny's also famous for his talk about Painless Perl Ports with cpan2port; XTaran's famous for a whole bunch of other things. I still have some catching up (wlog entries, keysigning, webpages, etc.) to do, please bear with me. I don't really have a proper work environment with me. There's a chance I will not be attending the Beer Event in the Delirium Tremens caf (last year's still remembered). Benny will certainly be there, though. Could someone please order nice weather? I still need to eat some lunch and find a supermarket to shop for the weekend!

3 February 2010

Enrico Zini: Cropping images with GDAL

Cropping images with GDAL I am working to get a better integration between Meteosatlib and GDAL. A nice aspect of GDAL is that it allows to create read/write drivers around two functions: Open and CreateCopy. Open opens a datset read only, and to implement that all you have to do is to implement read access to your data using the GDALDataset interface. To implement CreateCopy, all you have to do is to create a new file reading information from a GDALDataset; then call Open on it. This means that there is no need to support incremental updates, and that all the data required to create a new file is readily available. This simplifies matters a lot. GDAL provides some interesting image manipulation functions, that can work over just these two calls. The way it does it is by exploiting the concept of a virtual dataset, which wraps an existing dataset but changes some parameters on the fly. This means that you can wrap a read only dataset with a virtual dataset that transforms it somehow, and then pass the virtual dataset to CreateCopy to save the transformed image in a format of your choice. On top of that, for many transformations you do not need to create your own virtual datasets, but you can use the functions provided by the VRT GDAL driver. One can learn a lot on how to use VRTDataset by reading the source code for gdal_translate. By doing that I could come up with this code for cropping an image, which is an interesting VRTDataset example.
GDALDataset* crop(GDALDataset* poDS, int xoff, int yoff, int xsize, int ysize)
 
        VRTDataset *poVDS = (VRTDataset*)VRTCreate(xsize, ysize);
        // Copy dataset info
        const char* pszProjection = poDS->GetProjectionRef();
        if (pszProjection != NULL && strlen(pszProjection) > 0)
                poVDS->SetProjection(pszProjection);
        double adfGeoTransform[6];
        if (poDS->GetGeoTransform(adfGeoTransform) == CE_None)
         
                // Adapt the geotransform matrix to the subarea
                adfGeoTransform[0] += xoff * adfGeoTransform[1]
                        + yoff * adfGeoTransform[2];
                adfGeoTransform[3] += xoff * adfGeoTransform[4]
                        + yoff * adfGeoTransform[5];
                poVDS->SetGeoTransform(adfGeoTransform);
         
        poVDS->SetMetadata(poDS->GetMetadata());
        // Here I also copy metadata from my own domain
        char **papszMD;
        papszMD = poDS->GetMetadata(MD_DOMAIN_MSAT);
        if (papszMD != NULL)
                poVDS->SetMetadata(papszMD, MD_DOMAIN_MSAT);
        for (int i = 0; i < poDS->GetRasterCount(); ++i)
         
                GDALRasterBand* poSrcBand = poDS->GetRasterBand(i + 1);
                GDALDataType eBandType = poSrcBand->GetRasterDataType();
                poVDS->AddBand(eBandType, NULL);
                VRTSourcedRasterBand* poVRTBand = (VRTSourcedRasterBand*)poVDS->GetRasterBand(i + 1);
                poVRTBand->AddSimpleSource(poSrcBand,
                                xoff, yoff,
                                xsize, ysize,
                                0, 0, xsize, ysize);
                poVRTBand->CopyCommonInfoFrom(poSrcBand);
                // Again, I copy my own metadata
                papszMD = poSrcBand->GetMetadata(MD_DOMAIN_MSAT);
                if (papszMD != NULL)
                        poVRTBand->SetMetadata(papszMD, MD_DOMAIN_MSAT);
         
        return poVDS;
 
This function wraps a dataset with a virtual dataset that crops it. Just pass the resulting dataset to GDALCreateCopy to save it in the format that you need.

31 January 2010

Debian News: New Debian Developers (January 2010)

The following developers got their Debian accounts in the last month: Congratulations!

Thorsten Glaser: Hello, Debian!

I got an eMail tonight. I guess this means I can say hello officially now. (Everything else is details, waiting and fixing some bugs and technicalities, or so.) Thanks to everyone involved, I learned a lot already. Oh, and I had a look into madduck's book (the old sarge edition, which I got for free recently) and found a nice graphic explaining what non-native english speakers (I even had latin first, and 3 programming languages!) don't, from the Debian constitution. Congratulations XTaran for making it as well, even visible on the website already! Please don't file an "Please package mksh R39b" bug again, I am aware there's a new version ;-) as I'm upstream too. I'm just short of time at the moment, and I'd like to put out high-quality packages. Besides, the webpage needs fixing first (while the checksums and the changelog for the release are there, no proper announcement is yet, and I'd like, for this version, to add a "upgrading caveats" section, since due to bugfixes and better standards compliance some scripts need to be updated; some of the pdksh behaviour favoured Bourne over POSIX even!

30 January 2010

Wouter Verhelst: On MySQL and Oracle

I think Monty has well and truly lost it. The European Commision, after careful consideration, has cleared Oracle's purchase of Sun:
The Commission's investigation showed that another open source database, PostgreSQL, is considered by many database users to be a credible alternative to MySQL and could be expected to replace to some extent the competitive force currently exerted by MySQL on the database market.
I'd go one step further, and would say that MySQL is not a credible alternative to PostgreSQL. But whatever. Hopefully, if MySQL fails, then PostgreSQL will (finally) get the attention that it deserves. I'll have a real database every time over this piece of... anyway.[1] This is a fair argument, and to be sure it is certainly not a problem for anyone to migrate from MySQL to a MySQL fork, or (with some work) from MySQL to PostgreSQL. But Monty seems to disagree, and now tries to get Russia and China to block the merger. What's next, Andorra? [1] comments on this blog item in defense of MySQL will be vigorously moderated away. MySQL is a POS that falls over if data is corrupt, that corrupts its own data (most distributions call 'mysql_recover' in their initscript for a reason), and whose C API does not properly support cursors unless you want to block concurrent access until the cursor is closed (paragraph 3). Every time a customer asks me about MySQL, I vigorously recommend against it, because it's a bad idea.

29 January 2010

Siegfried Gevatter: Confession

My dear Ubuntu, I think the time has come that I make a confession. You may be wondering why I haven t spent much time with you those last months, and you have the right to know. The case is, I have another one. She s called Debian. No, it s not because of you. It s also not because of your parents; while they aren t perfect, they are great in many ways and I certainly don t want to run away from then. Just wait and let me explain this. You surely remember that I spent a week with her some time ago? Well, now that I want to join Debian s family, I decided that after all that wasn t much time to get to know here, so I gave her another chance, and with this second experience I fell in love with her unstable character. Ubuntu, you are really extraordinary, and I m still telling anyone who wants to listen about your wonders, but you just can t appease my desire for trying out new things as well as Debian does. Now, this doesn t mean we won t see each other anymore. I ll still take you with me whenever I travel, and I ll continue helping you with the household. In fact, all this wouldn t signify a big change at all, if it wasn t that at the same time I also decided to refocus most of my efforts on raising children, which is what really reduced the time I spent helping you. So, while currently I m not seeing you as much as before, I hope you all the best, and I ll still try to help you advance, be it indirectly (1, 2) or, while probably to a lesser degree, continuing with direct contributions. By the way, hello Planet Debian!
3 comments
Siegfried-Angel Gevatter Pujals, 2010. Permalink License Post tags:

Siegfried Gevatter: Confession

My dear Ubuntu, I think the time has come that I make a confession. You may be wondering why I haven t spent much time with you those last months, and you have the right to know. The case is, I have another one. She s called Debian. No, it s not because of you. It s also not because of your parents; while they aren t perfect, they are great in many ways and I certainly don t want to run away from then. Just wait and let me explain this. You surely remember that I spent a week with her some time ago? Well, now that I want to join Debian s family, I decided that after all that wasn t much time to get to know here, so I gave her another chance, and with this second experience I fell in love with her unstable character. Ubuntu, you are really extraordinary, and I m still telling anyone who wants to listen about your wonders, but you just can t appease my desire for trying out new things as well as Debian does. Now, this doesn t mean we won t see each other anymore. I ll still take you with me whenever I travel, and I ll continue helping you with the household. In fact, all this wouldn t signify a big change at all, if it wasn t that at the same time I also decided to refocus most of my efforts on raising children, which is what really reduced the time I spent helping you. So, while currently I m not seeing you as much as before, I hope you all the best, and I ll still try to help you advance, be it indirectly (1, 2) or, while probably to a lesser degree, continuing with direct contributions. By the way, hello Planet Debian!
4 comments
Siegfried-Angel Gevatter Pujals, 2010. Permalink License Post tags: , ,

28 January 2010

Thorsten Glaser: To do.

I m going to FOSDEM, as usual The MirOS Project will have a booth at FOSDEM 2010, business as usual. If you thought otherwise, you re crazy I know I should write a wlog entry about the BSP, write more, release mksh R40, fix the TaC of it and the kwalletcli webpage (thanks again, it s now in Debian sid!) etc.pp but I also need to prepare an ISO for FOSDEM, etc. Heck, I should prepare a talk for FOSDEM, but I m not going to. If I need to stand there and talk, I ll talk, not hold a presentation. I ll just see what people are interested in, talk about The MirOS Project, and improvise. I m busy, and there s only so much computing you can do in a day. This does include the dayjob. At least, my NMUs are in Debian now and probably can help people (and I submitted info about other bugs too). Anyway, watch the news in the months to follow can t talk about everything now.

Next.

Previous.