Planet Midgard
Autobuilder for extras repository public beta
Posted on 2008-04-25 17:41:00 GMT.

A while ago we discussed the idea of an autobuilder for the extras repository. We have been working on creating such an autobuilder and have been testing it in private. As a result we now think it is time to do a tests with a larger group and make it publicly known. Please give it a try and tell us your results.
- What does the autobuilder do?
The autobuilder takes a source package from the incoming queue and tries to build it in a fresh environment. The builder fetches all dependencies from the extras-devel repository. If it can't find the dependency in extras-devel, it will fail and send a mail to the extras-cauldron-builds list.
If there are no problems with the package, the builder can create armel, i386 and source packages. Those will be put in the extras-devel repository after a successful build.
Instructions for the builder can be found at here.
The builder only handles building one package at a time. If you have dependencies that are not present in the extras-devel repository, please upload these first.
- web-based assistant
We have also created a web-based assistant to help you with requesting rights to upload and creating/uploading of source packages. You can upload packages to the builder with either dput or the assistant.
- How do I get my package into extras?
After a successful build a package will appear in the extras-devel repository. You can move your packages from extras-devel to extras with the promotion interface. Instructions for the promotion interface can be found here.
We would like to invite all developers to take a look at the autobuilder and try it out. Please discuss problems and feature requests on the maemo-developers list.
More information about our effort can be found at the extras-cauldron website.
Midgard 2: Finally legacy-free
Posted on 2008-04-24 22:41:14 GMT.
While watching Everaldo work on the upcoming Midgard C# bindings, I decided to try running Midgard 2 with lighttpd. After quite a lot of struggling to get latest SVN checkout to compile on my mac, and some playing with lighty rewrite rules, I was greeted with a working MidCOM 3 page:
So, after such a long time, Midgard 2 is finally a running system without any legacy dependencies, independent of HTTP server module or a specific database engine. Things will be even more interesting as we will really start using Python, PHP and mono bindings together using D-Bus.
Technorati Tags: dbus, midcom, midgard, mono, php, lighttpd, python
Midgard with Lighttpd
Posted on 2008-04-22 06:05:55 GMT.
Please. Read the whole this simple howto. It's adressed for developers who would like to have Midgard and Midgard2 available as web services on the same machine. Of course, you may still install or compile Apache 1.3 as the second web server.
First of all you need to install and configure Lighttpd web serwer. On debian I installed it using apt-get:
apt-get install lighttpd
Do not forget to stop Apache before installing lighttpd. If you do not, dpkg will return with failure status as lighttpd tries to bind to port 80 by default when package is installed.
Also, you need to have php5 compiled with fast-cgi support. Again, on debian install it quickly:
apt-get instal php5-cgi
Edit cgi's php.ini file (/etc/php5/cgi/php.ini), and add midgard support:
extension=midgard2.so
midgard.configuration="midgard"
midgard.http="on"
Then configure your new web server. I found these two sites very helpful to configue lighttpd server:
Later on, you need to install Midgard2 from trunk, which is going to be released as alpha2 soon.
In my case, I configured lighttpd with these options:
server.port = 81
Just to have both, Apache and lighttpd available. You may of course use different port if you like.
Enable required modules, mod_rewrite and mod_fastcgi:
server.modules = (
"mod_access",
"mod_alias",
"mod_accesslog",
"mod_compress",
"mod_rewrite",
"mod_fastcgi",
)
Configure fastcgi:
fastcgi.server = (
".php" => (
"localhost" =>
(
"socket" => "/tmp/php-fastcgi.socket",
"bin-path" => "/usr/bin/php5-cgi"
)
)
)
Configure virtual host:
$HTTP["host"] == "myhost" {
server.port = 81
server.document-root = "/var/lib/midgard/vhosts/myhost/8080"
url.rewrite-once = ( "^(.*)\.*" => "midgard-root.php" )
}
I use virtual host on 8080 port with Apache, so I wanted to re use its DocumentRoot. You will change it of course, depending on your needs.
midgard-root.php file should be copied or symlinked from midcom's git repository. I do not have to remind that midcom itself should be installed and ready to use.
Do something you should never do in real life. It seems that lighttpd drops root privileges too quickly and php module is loaded with configured user and group privileges. At least I couldn't manage to open root's configuration files from system configuration directory( which is easily done with Apache ). To establish database connection(s) you must have all secret configuratoin readable for the whole world.
chmod 644 /etc/midgard-2.0/conf.d/*
After this, restart lighttpd:
/etc/init.d/lighttpd restart
And open http://myhost:81 with your favourite browser. If all went fine, you should have midcom's web page without style. Reason is that we do not make midcom-static exception in our hosts' rewrite condition.
GeoClue presentation in FISL 9.0
Posted on 2008-04-19 00:25:48 GMT.
I'm currently in Porto Alegre, Brazil attending the 9th International Free Software Forum (FISL) - a huge conference with some seven thousand participants. My talk in the event will be about GeoClue, the geo-information framework designed for Linux-based mobile devices.
For those unable to be there or missing the 9am talk because of the parties tonight, the slides are now available online:
GeoClue is now nearing release, and so we will probably be present also in the GUADEC and Akademy conferences this summer.
Technorati Tags: geoclue, fisl
Wallpaper contest
Posted on 2008-04-18 06:50:48 GMT.
As Thomas and Andrea already mentioned, we’re running a GNOME wallpaper contest.
We had lots of great submissions already, but we really want yours as well. Go on, submit it today!
[RFC] Maemo package guidelines: mandatory categories
Posted on 2008-04-17 11:45:00 GMT.

Here is my first suggestion to clean up the complete mess we have at the moment when it comes to package categories in the maemo extras repository. There is no official list of categories, which has brought us to state we are in now.
We have these nice categories for example: 'Boingo', 'Canola'. Those should never be a category by themselves. We also have a lot of duplicates like 'cli' ,'Commandline' and 'Web','www' and 'Utilities','utils'.
This really has to stop as this is confusing for end users. We, the maemo community, need to find a solution and fix this.
If we look at Debian, we can see that they have the following list of categories:
admin, base, comm, contrib, devel, doc, editors, electronics, embedded, games, gnome, graphics, hamradio, interpreters, kde, libs, libdevel, mail, math, misc, net, news, non-free, oldlibs, otherosfs, perl, python, science, shells, sound, tex, text, utils, web, x11
My suggestion would be to base our list off the Debian list and remove the categories that are not suitable for Maemo. We might also want to add some categories if we find some missing.
admin, comm, devel, doc, editors, games, graphics, interpreters, mail, net, news, utils
and add:
desktop, database, education, internet, multimedia, office, scientific, security, system, travel
Please feel free to suggest other categories. Try to keep them as broad as possible. I would really like to get a list of categories where every application can be in at least one category. It would be nice not to need the 'misc' or 'other' category.
Perhaps it would also be a good idea to have the Application Manager display the pretty name for each category. e.g. comm -> Communication. That might be step 2 though.
I also would like your feedback on this idea:
"For diablo we only accept packages in the extras/extras-devel repositories when they have a valid category."
I'm really not sure if we can do this in time for diablo, but at least we can try to get the community to agree on this. I don't think we can do anything for existing repositories, but at least we could try for the new ones.
Please respond with your ideas in the comments section, but keep it to the category subject only.
Edit:
There seems to be a list of categories for the Application Manager. I don't think that list has enough categories, but it is a start.
Self charging N810
Posted on 2008-04-15 12:26:00 GMT.

A while ago I found out that it was possible to charge my N810 via USB connected to a regular PC. This can be very convenient if you don't have a socket available for a charger.
The Nokia N810 has the ability to be a USB host. It can provide a little bit of power via it's micro-USB port. As you can see in the picture, the device notices that the charger is connected.
Tools needed for this trick:
- Nokia USB charger
- USB F-F adapter
- Standard micro-USB cable
Urho Konttori's usbcontrol
By now you should probably already know that this about the same as Perpetual motion, a great idea, but impossible (Without rewriting the laws of physics).
But still, it is good fun to see the charging notification pop up.
Numpty Physics and Fennec: the tablet is becoming more fun
Posted on 2008-04-11 19:54:41 GMT.
I've been using my N810 as sort of an universal communicator for a while now, and for this it has generally served well. The only thing I really miss is Skype video calls.
But other than that, I haven't been using the tablet too much. In real-world usage I've found the browser way too unresponsive, and the RSS reader too limited. But now, thanks to two very promising projects the tablet is becoming fun again:
Fennec is the mobile version of the Firefox browser with heavy performance optimizations (install):
Numpty Physics is a maemo port of the awesome Crayon Physics puzzle game where you draw objects and play laws of physics to get a ball moving to the end of a track (download):
Good stuff!
Technorati Tags: maemo, n810, fennec
MidCOM3 without apache module
Posted on 2008-04-11 12:15:07 GMT.
This is really HOT!
It's proof of concept to work with Midgard without its Apache module. And the concept is cool :) Especially with this lovely MidCOM3 screenshot.

GitHub for MidCOM 3 developers
Posted on 2008-04-11 10:21:00 GMT.
Yesterday Arttu Manninen posted notes on how to use git for MidCOM 3 development. In addition to the repo.org.cz usage he described, the other way to work on the next generation PHP framework for Midgard is using the GitHub service.
Rails on the Run has quite good tutorial.
Technorati Tags: midcom, midgard, git, github
Prepared for Saturdays activities
Posted on 2008-04-11 08:14:29 GMT.
Shell usage statistics
Posted on 2008-04-10 13:59:05 GMT.
This meme seems to be running again:
Compass:~ bergie$
history|awk '{print $2}'|awk 'BEGIN {FS="|"} {print $1}'|sort|uniq -c | sort -nr |head -n 10
209 git
47 svn
30 cd
24 sudo
24 phing
18 ssh
16 ls
13 vi
12 ~/ajatus_ssh_replicate
12 scp
Interesting to see how the stats have changed in one and half years. Main changes are due to Ajatus replication, and git being used for MidCOM 3 development.
Technorati Tags: history, shell, unix
Zenburn colors for PHP editing in SubEthaEdit
Posted on 2008-04-09 12:58:01 GMT.
In my company we're using the SubEthaEdit collaborative editor for our development work. It is nice to be able to share editing sessions when pair programming, or just showing a particular solution to a colleague.
Yesterday's del.icio.us popular alerted me to the Zenburn color scheme for programmers. It is a quite nice low-contrast color scheme developed by Jani Nurminen.
To try it out, I made a SubEthaEdit color scheme for using it with the PHP-HTML mode:
The color scheme file is available for download. If others are interested in collaborating on this, the scheme is also in a GitHub repo.
Technorati Tags: osx, php, zenburn, subethaedit
Interprocess communications in Midgard: D-Bus comes to the web
Posted on 2008-04-08 13:11:37 GMT.
In his recent blog post, Piotr Pokora showed how the the D-Bus API will work in Midgard 2. D-Bus is an interprocess communications system that is used heavily in modern Linux desktops like GNOME and KDE. With Midgard, the same system now becomes available for PHP and web applications:
midgard_python "service":
import dbus.mainloop.glib
import _midgard as midgard
def mbus_callback(object, arg):
print "Hi! I am midgard_dbus from midgard-python. I got message:"
print object.get_message()
mbus = midgard.dbus("/midgard_article")
mbus.connect("notified", mbus_callback, "foo")
mainloop = gobject.MainLoop()
mainloop.run()
midgard-php "client":
$message = "Greetings from midgard-php!(" . mgd_version() . ") PHP ver." . phpversion();
midgard_dbus::send("/midgard_article", $message);
I started php script which immidietialy[sic] ended, and on midgard-python service's terminal I got this message:
Hi! I am midgard_dbus from midgard-python. I got message: Greetings from midgard-php! (2.0alpha0) PHP ver.5.2.5-3
This is a major milestone in our greater plan for the future of Midgard, and should be interesting to also other PHP and web application developers.
Good work, Piotras!
Technorati Tags: dbus, midgard, php, python
Beyond Google Maps: Mapstraction is a good starting point
Posted on 2008-04-08 12:54:15 GMT.

A List Apart 256 has a very interesting article on Taking Control of Your Maps, explaining how to provide richer and more customized web map solutions using tools like OpenLayers and Mapnik, and the free data provided by OpenStreetMap:
For the practical developer who wants to add geospatial information to a site or application, the Google Maps API has been an easy call.
But, perhaps no longer. As websites mature and the demand for geographic applications grow, the old mashup arrangement is starting to chafe. Mapping components are more and more vital, and so we demand greater control, expressiveness, and functionality from them.
Fortunately, as in many aspects of internet technology, an ecology of open source online mapping tools has emerged alongside the market leader. It is now possible to replicate Google Maps’ functionality with open source software and produce high-quality mapping applications tailored to our design goals. The question becomes, then, how?
While setting up your own map server might be a lot of effort, Mapstraction could provide a nice way to move beyond the "same old" Google Maps. With the same javascript you can experiment with different map providers like OpenStreetMap, Yahoo! and Microsoft.
Mapstraction comes bundled with Midgard's GeoCMS component, org.routamc.positioning. Switching map providers can be done in component configuration, and then displaying things on a map is very straightforward:
$map = new org_routamc_positioning_map('my_photo_map');
foreach ($photos as $photo)
{
$map->add_object($photo);
}
$map->show(400, 200);
Technorati Tags: mapstraction, midcom, midgard, openlayers, openstreetmap, mapnik






