Older blog entries for zeenix (starting at number 323)

13 Apr 2014 (updated 13 Apr 2014 at 19:08 UTC) »

Location hackfest

I'm organising a hackfest in London from May 23 to 25 2014. The plan is to improve our location-related components and to get them useful to other OSs: KDE, Jolla and hopefully also Ubuntu phone. If you are (or want to) doing anything related to location and want to attend, please do add yourself to wikipage as soon as possible so I can notify our hosts if we'd need a bigger room.

Oh and if you need a place to stay, do contact me!

I'm thankful to awesome Mozilla folks for hosting this event and providing an awesome open geolocation service to everyone.



Boxes 3.12

I just rolled out Boxes 3.11.92, which is going to become 3.12 in a week. Apart from lots of fixes and minor improvements like addition of keyboard shortcuts for improved accessibility for example, there are some note worthy changes against 3.10:
  • Dropped use of clutter and clutter-gtk: While it was a good idea to mix gtk+ and clutter at the beginning of the project to make most of the animations and transparency controls possible, Gtk+ gained new API over last few years to make most of what Boxes needed, possible. So I decided to attempt to remove clutter* from the picture and I'm glad to report that my attempt was a success. This means:

    • Less animations: Some of the animations we had are still not possible with Gtk+ (at least not in any easy/nice way) so they had to be dropped but they are nothing really essential to how Boxes work and were only good for impressing first time users. I'm talking about box thumbnail flying around the window for transitions between different UI states.

    • More animations: Making use of new Gtk+ API, we gained some nice animations for UI transitions that nicely makes up for the dropped animations. Here is a video of Boxes 3.12, where you can see all these animations.



    • Simplified code: Removal of clutter actors from widget hierarchy also made it easier to simplify the hierarchy quite a bit. I also took the liberty of moving most of the UI setup to UI description files separate from rest of the code. So overall the code is a lot cleaner and therefore much easier to maintain, hence removed clutter even literally.

  • Ability to easily import existing VMs from system libvirt: Many people have been using virt-manager for years and while they'd want to use Boxes, them not being able to easily use their existing VMs wasn't  encouraging them to switch. Now we've fixed that.



  • NAT networking: Since the very beginning of the project, one complain we kept getting was that the default network setup by Boxes in VMs was slow and VM was unreachable even from the host machine. This has finally been fixed by Boxes now setting up a NAT network in new VMs using the special bridge network setup by libvirt. This means that all VMs are on the same private (to host) network and therefore VMs and host can directly communicate with each other. Its also much faster than 'user-mode' networking we've been using till now.
Thats basically it for this release! Now some features I'd want to add in 3.14:

  • Import and export of VMs. Doing this properly will involve creation of a new library that deals with OVF. I'd like it in a library because there is at least one project (apart from Boxes) that can make use of it: gnome-continuous. Boxes already allow you to import the qcow2 images gnome-continuous produces but since this image does not provide information about the VM itself, you can very easily find yourself creating a broken VM with them. QXL breaking every other release and gnome-continuous tracking git master of that does not help at all here /rant. So if continuous would provide OVF files instead of raw disk images, it can tell Boxes to use 'vga' rather than 'qxl' whenever QXL is known to be broken.

  • Support for express installation for many other OSs/distros, especially Debian/Ubuntu. The idea has been proposed for SoC and there is already one student that has applied for it.

  • Support multiple monitors in VMs.

  • Snapshots: You went for an OS update and it completely destroyed your VM, what do you do? Snapshots will make it possible to save the VM for you before you go for that OS update so that if things go south, you have a way to easily recover. What if you installed multiple updates at different times and you don't know which update caused the problem. Snapshots will also make it possible to save multiple checkpoints of your VM so you can go back to any of them and then use the one that was not broken. Pretty cool if you think about it and makes you wish you could do the same with life. :)

    This idea has also been proposed for SoC and there are two students who have already applied for it.

  • Downloading of ISOs and images (and also VMs, after we have the VM import feature in place). Currently you can't give Boxes URL of a remote ISO or image and expect to be able to handle that. We need to fix that but automatically downloading the ISO/image for you. To make it even better, would be nice to:

    • Autocomplete URLs while you type it in the wizard using the list of known URLs in libosinfo database. E.g you type "Fed" and URLs of all Fedora releases get proposed to you, you keep typing till "Fedora 19", you already have a URL to hit enter on.

    • Provide a way to add entries to the ready menu you get in the wizard. This will allow us to provide 'a few clicks' ™ way for user to try latest GNOME unstable releases and distros to do something similar for bleeding-edge/development snapshots of their distro.

    This has also been proposed as second part of the "Automated installation" SoC project I mentioned above.

Syndicated 2014-03-19 15:11:00 (Updated 2014-03-19 15:20:41) from zeenix

Geoclue 2.1.1

I just rolled out Geoclue 2.1.1! Since my last post with Geoclue update, there has been lots of changes. You can find a list of all the changes here but here are the highlights:

  • Modem geolocation: If you got a 3GPP modem, geoclue will now be able to use that to locate you (with neighborhood-level accuracy) using opencellid.org. Additionally if your modem has GPS capability, geoclue can use that as well and as you know GPS is the most reliable geolocation source.

    One issue with GPS currently is that it takes a while before it can get a lock on and reason for that is that we currently have no support for A-GPS. I'll be talking with Aleksander Morgado during the weekend about how we can add that support but if I've understood correctly, it will need more work in ModemManager than geoclue now that it has all these other sources.

    Geoclue locating me using 3GPP source

  • WiFi geolocation: In my last relevant blog post, I mentioned that we'll be implementing this using Open WLAN Map project but around the same time Mozilla announced their own public geolocation API. After careful consideration, I decided to go for Mozilla Location Service. So geoclue now has a geolocation source that makes use of this public service.

    This service being very new, doesn't have a lot of data. If you want to help us (GNOME), Mozilla and all users of this service and geoclue, you can gather data using MozStumbler android application, which should work on most (if not all) android phones. I also implemented data gather in geoclue but it requires a GPS-enabled 3GPP modem and (at least for now) needs to be explicitly enabled in our configuration file.

    An advantage of using Mozilla Location Service is that it offers a Google geolocation compatible API as well. Geoclue uses this compatibility API and you can make it use Google's geolocation service instead by tweaking an option in our configuration file. Please note that geoclue is not responsible for any misuse of Google API. Please do read their ToS before use and you'll need to get yourself a key before you can use their API.

  • API to check if geolocation service is in use and next version of GNOME Shell will make use of it to show an icon in the panel to indicate to user that their location is being accessed.
GNOME Shell indicator for 'location services in use'

So keeping all this in mind, I'm pretty happy with our progress on geoclue2. I will be in Brussels this weekend. Unfortunately my submission about geo* to desktop devroom didn't make it to the shortlist (which I hear is half as short as last year's) but feel free to talk to me about geolocation and maps etc if you are around.

http://fosdem.org/

Syndicated 2014-01-30 15:52:00 (Updated 2014-01-30 15:52:50) from zeenix

Moving to London, UK

For those who haven't heard the news yet, I'll be joining Red Hat UK and terminating my Red Hat Ltd, Finland branch contract starting Nov 1 2013. Naturally, I'll be myself moving to London soon along with my wife and cat.

I'm about to embark on a trip to Canada and US to attend Boston Montreal  and Google Summer of Code mentor summits and I'll return on Oct 22. Two days after that I fly to London to start the hunt for a decent apartment. Once I have an apartment, my wife and cat will come over as well.

That's all folks.

Syndicated 2013-10-05 03:00:00 (Updated 2013-10-05 03:00:06) from zeenix

GNOME 3.10, 3.12 and me

Wow! Its been months since I last blogged. I have a good excuse and a bad one. The good one is that I've been extremely busy with trying to get some of things ready for GNOME 3.10. The bad one is that w/ me sharing all important events on all 3 major social networks, I don't feel too motivated to put all those into blog posts (yes, I'm very lazy).

As you probably already know, I've been working on Maps, geolocation and geocoding apart from Boxes in 3.9 development cycle. Although there is still a lot of work to do in all these, I'm really happy with what we achieved in a short amount of time:
  • Maps: There was  desire and design page for a map application for GNOME but I didn't see any implementation. I looked around and found out that Mattias Bengtsson had already a repository so I helped him start the project. Currently it only allows you to some basic things you expect from a map application, like searching for places and finding your location but for a preview application that was developed in a few months by a few people, its a big achievement that everyone involved should be proud of. We still have plenty to do for 3.12, where its supposed to be a useful and stable application and not just a preview. Unfortunately, I myself won't have a lot of time for Maps in this cycle, so if you are interested in maps (lots of fun guaranteed!) and are looking for a way to contribute to GNOME (or Free Software in general), here is your chance to change the world for better.



    Since Maps use the awesome OpenStreetMap project (through libchamplain), another way to contribute is to edit maps directly in OpenStreetMap itself. This is ideal for technology enthusiasts who lack programming skills or interest in it. That is not to say that almost everyone would enjoy this kind of contribution. My good friend, Federico tells me that it could easily become an addiction. OpenStreetMap has several editor clients for different platforms so you can choose the one that suits your needs.

  • Geoclue2: So we basically started a re-write of Geoclue some months back. Rationale could be found here. Currently we only have IP-based geolocation and that unfortunately is limited to city-level accuracy at best. While this is not enough for some applications (e.g Maps) its already serves well for some important applications like Clocks and gnome-settings-daemon. So in GNOME 3.10, your local clock is automatically added to Clocks and your system timezone automatically updated (if you choose so) as you travel around with your laptop.

    In 3.12, I would like to first address the privacy concerns: Users should be given control over which applications should be allowed to access their location. This will be done through per-user agents running in desktop sessions. I already have implemented the geoclue side of this and have implemented a demo agent but I gotta implement an agent in at least GNOME Shell before Geoclue by default requires all apps to be authorized. KDE (every linux-based OS) folks will also have to implement an agent if they intend to use Geoclue2.

    Once privacy in place, I would really want to add more geolocation sources: GPS, 3G and WiFi-based geolocation. The first two, I'm told should be easy to add w/ latest ModemManager.

    WiFi-based geolocation will most likely be based on Open WLAN Map project. I have not yet looked at the API their library provides but I'm hoping its not too hard. Implementation difficulty aside, one big issue is that their database is hardly comparable to that of Google, Nokia, Microsoft etc so in most cases (unless you are in Germany) we'll not be able to rely on this source to locate you. That is a pity since this is the only option we have for wifi-geolocation, being open database of this type. On the bright side, they provide easy ways to improve their database using your smartphone. I'm hoping that by making use of this service, we'll further encourage contributions to this database and in a few years, this database will have enough data from many different areas around the globe.

  • Geocode-glib:  As I said, Maps already allow you to search for different places on the planet. This is done through a process called geocoding. This process translates a string, which could be the place name or part of it, and gives you details about all places that match such a string. The most important part of these details are coordinates. Another small feature you might notice in Maps is the "What's here" item of the context menu, which shows you details about the place where you cursor currently is on the map. This is done through a process called reverse-geocoding. Simply put, given the coordinates of a place, you get details (especially name) about it.

    Bastien had been working already on a library for geocoding and reverse-geocoding called geocode-glib. Since I needed this for Maps, I helped clean it up. While doing so I realized that it used Yahoo Places service, which not only is a closed/proprietary service, it doesn't have enough data and most importantly is not designed to be used for geocoding. Turned out that OpenStreetMap folks provide an open service for geocoding, Nominatim I ported geocode-glib to use Nominatim instead of Yahoo Places. Since Nominatim shares the same database with OpenStreetMap, contributing to Nominatim is the same as contributing to OpenStreetMap and vice versa and you use the same clients/tools to do that.

All this would not have been possible without help from our awesome community. Special thanks goes to my Google Summer of Code students, Kalev Lember and Mattias Bengtsson, and my colleague and friend Bastien Nocera. For Maps, I was also very lucky to get help from an awesome new contributor, Jonas Danielsson. Maps wouldn't look any good without his work.

Syndicated 2013-10-05 02:49:00 (Updated 2013-10-05 02:49:15) from zeenix

24 Jun 2013 (updated 25 Jun 2013 at 02:06 UTC) »

Last week in Gothenburg


Just like every year, I'm a mentor in Google Summer of Code 2013. This year I'm mentoring two students:


  • Mattias Bengtsson, who will be working on implmenting route search in Maps. Since the Maps project was actually started by Mattias himself before he even thought of SoC and he has been working on maps (in general) as his fulltime job for 2 years now, I feel very confident about him being able to deliver.
  • Kalev Lember, who will be working on implementing the new date&time panel in GNOME control center. Kalev has been contributing to different GNOME projects and has been very active in Fedora packaging business. Having had the pleasure of pair programming with him last week, I feel very confident about him delivering his project as well.

So I got two awesome students, what could be better? There is the coincidence that both of them are located in ̶G̶o̶t̶h̶a̶m̶ ̶C̶i̶t̶y̶ Gothenburg, the very same city where one of our designers, Andreas Nilsson lives in. Since Fabiana Simões (another designer) was visiting Gothenburg, Andreas saw an good opportunity for a hackfest and thats where I was at last week along with the rest of the Maps team. I'm glad to report that we got some stuff done:





  • We all discussed the design and investigated which online services we can use for various features. Topics included:
    • Single vs. multiple instance app
    • Map view animations
    • Specialized printing of routes
    • Rendering our own tiles in the future
  • Andreas drew us icons and mockups for zoom-in/out control and routing UI.
  • Mattias worked on moving most of the Maps UI code into .ui files, implementing zoom in/out controls and made sure that he has everything he needs from designers for his GSoC project and beyond.
  • I ported Maps to geoclue2, made progress on porting geocode-glib  from Yahoo Places API to Nominatim and to directly use libsoup, and reviewed patches from Mattias and Kalev.
  • Kalev helped me out with porting Maps to geoclue2, figured out the cause of annoying bug in Maps that made it impossible to do anything in Maps once you click on any markers, and added basic printing support.


It was really nice to meet Mattias and Kalev in person and I finally had the pleasure of meeting Andreas Henriksson outside the Internets. There was also the GNOME Beers event and in general we did quite some team bonding. My only regret about last week is that that I didn't get around to do any sight seeing.

Special thanks to


  • Andreas for arragning the event and helping me navigate the city.
  • Chalmers University of Technology and Henrik Sandklef for the venue.
  • GNOME foundation for sponsoring my flight tickets.
  • Hanne Sundin and Martin Zackrisson for providing me a place to stay.


Syndicated 2013-06-24 16:23:00 (Updated 2013-06-25 01:36:41) from zeenix

New in Boxes 3.8

We just rolled out Boxes 3.7.92 and have now entered code freeze. This means that apart from translations and doc updates, Boxes is ready for the stable 3.8 release (due next Monday). So whats new you ask? Since Boxes 3.6, we have been hard at work, making Boxes an app that is so awesome that it makes you want to use virtual machines if you are not already. :) Boxes is now a lot more reliable, has improved and more impressive UI and has cool new features:

  • Add USB redirection support in new VMs and option to add it into existing VMs. i-e You can use your USB devices (camera, flash drive etc) plugged into host from the guest operating system.


  • Smartcard support. This means if you have an appropriate reader device, you can use that to read information from your smart cards (credit/bank cards etc) from your virtual machine boxes.
  • Automatically download and installation of all virtio and QXL drivers, and spice-vdagent as part of Windows XP and Windows 7 express installation. This means following working out of the box:
    • Copy&paste between host and VM.
    • Guest resolution automatically adjusted to fit the Boxes window.
    • Very efficient disk I/O (helps in reducing installation time e.g).
    Here is a screencast of Windows XP with QXL in action.
  • oVirt support. This means you can now access all your virtual machines running on a (most likely remote) oVirt broker from Boxes by simply providing it's URL. Christophe blogged about it last year.
  • Improved selection view:
    • Option to pause VMs.
    • Options to select all, none and running boxes.
    • Allow accessing properties for non-running VMs.
     
    Here is a screencast of new selection view in action.
  • Allow tweaking properties for remote machines in the wizard.
  • UI looks a lot more like UI mockups and more consistent with Documents.
  • Add initial experience greeting. As a consequence, we don't auto-launch wizard on first time usage anymore.

    Please ignore the notification about box deletion. You don't get that on first use, I promise!

  • Support for changing the CD-ROM device/ISO from properties. You can see this option in  the screenshot above along with USB redirection options.
  • Selecting item when maximized automatically enters fullscreen view. You see this in action in the QXL demo screencast I pointed to above.
  • Mark recommended RAM and storage of guest OS (when known) in properties.


  • Allow search with multiple terms. A search like "foo bar" now means name containing "foo" and "bar". This is nicer, and what you expect from e.g. gnome-shell search.
  • Allow drag to unfullscreen Boxes.
  • Troubleshooting log viewer to system properties.
  • For Developers:
    • We now make use of libosinfo for express/automated installations. Support for new OSes/distros can be added through libosinfo. No Vala or C hacking needed, only XSL/XML.
  • Loads of other fixes and minor improvements. For more details: http://git.gnome.org/browse/gnome-boxes/tree/NEWS 

Hope you like love Boxes 3.8!

Syndicated 2013-03-20 02:31:00 (Updated 2013-03-20 02:35:18) from zeenix

23 Nov 2012 (updated 26 Nov 2012 at 18:04 UTC) »

Boxes video tutorial

I have been meaning to do this for a while and now I finally managed to do it: Here you'll find tutorial on Boxes. I know the sound quality and volume isn't good and there is other mistakes/issues but I'm not too ashamed as this is the first time I've done this and tools that I needed/wanted were all breaking on my Fedora 18 laptop.

UPDATE: I uploaded an updated version of this tutorial with slightly improved audio. To improve it further, I'll have to re-record the audio or the whole video but right now I don't have time for that. Perhaps in a few weeks..

Syndicated 2012-11-23 16:44:00 (Updated 2012-11-26 17:20:30) from zeenix

GUADEC 2012

I was at GUADEC last week like many other cool gnomies. It was a lot of fun, just like very year but I believe this was one of the best, especially how it was organised. The feet marks on the floor were was just an awesome touch that kept on reminding us everyday that good conferences are a result of a lot of hard work.

Seems its slowly becoming a tradition of mine since last year for me to stay at one of the organiser's house. :) Last time, I stayed with Lennart for the noncore days and this time I stayed all the days with Xabier and Laura. While they were very busy with their organising duties at the conf, they at the same time did an awesome job as my hosts. Xabier made sure that I don't have any problems what so ever and that I get to eat the best food in town and have a lot of fun. On top of all that, he woke-up 5:15 AM to drive me to airport. TBH I feel pretty bad now, knowing that I can't possibly return the favor. :( Thanks so much Xabier and Laura. You guys are awesome!

A Coruña is a very nice little town: people, beaches, history, culture, food etc etc. When it was combined with a lot of fun people from all over the world, it was like being in heaven. That said, there was one thing that was a bit of an unpleasent surprise for me: it gets really chilly at nights. Since I wasn't prepared for that, I wore shorts even in the evening and ended-up catching a cold. Later it turned into a fever. Fortunately, Xabier was there to take very good care of me and even took me to a doctor. He actually had to insist on that as I'm usually too lazy for that. I got much better before flying back but I still haven't completely recovered. Coughing like crazy..

There were many great talks but my favorite one was "PiTiVi and the GES: state of the onion" from Jean-François (AKA Jeff) . I was actually on my way to another talk that was scheduled at the same time but I caught a glimpse of his "slides" from the door and couldn't resist checking it out first. Once I got into the room, it was hard to leave. Awesome job Jeff! Out of pure coincidence, I was having some problems with Pitivi while working on my slides so I was directed to Jeff by people who knew him. Turned out that Jeff was having trouble with Boxes not working for him so we both helped each other out. In the end, our problem was quite the same: We were both trying to do something that was posible with Pitivi/Boxes. :) My second favorite was "The History of GNOME" keynote from Federico, Jonathan and David. It was nice to hear the inside story of early days of GNOME development, how some of the core GNOME hackers used too look like back in the days and the screenshots shown brought back many good memories from my early use of GNOME (think several hours wasted on playing with hide/unhide buttons on the panel).

My Boxes talk went OK'ish. Everything else went fine (even the demos, something that hardly ever work for me) except for the videos. I never included videos in my talk before so I wasn't very prepared to prepare for it. Lame excuse, I know.

Talking of Boxes, Christophe arranged a meeting between all the Boxes and SPICE developers present at the conf with our designers, Jakub and Jon. We gathered very usel feedback from them and they noted down some action points for themsevles to come up with mockups for some usecases/issues not yet covered. Talking of Jakub, it was nice to meet him outside Battlefield arena for a change. :) Well, I've had the pleasure of meeting him in person before but we weren't really close friends until 6 months ago when I joined him and his Czech and Polish friends in their Battlefield addiction sessions.

Then there was the GNOME OS BoF. I think that also went very nicely. It took most of the day but we now have a much more concrete idea of what GNOME OS is all about or going to be. A lot of what, why, how and who was discussed thoroughly. The most important thing was that everyone agreed to go forward with the idea and its no longer just some vague thought up in the air. Hopefully there will soon be documentation and mailing-list about it too (we already got an IRC channel).

Last but not the least, it was a pleasure to meet many new contributors, mainly the GSoC and OPW students. Its great seeing our outreach program  working so succesfully. Kudos to everyone involved, especially Marina. AFAICT both students working on Boxes-related projects, Fabiano and Jovanka took full advantage of their presence at GUADEC and hopefully will be able to completele their projects in time.

Syndicated 2012-08-06 00:37:00 (Updated 2012-08-06 00:51:40) from zeenix

Adding information to libosinfo

Some weeks back, Marc-Andre told me that it will probably be helpful for potential contributors if I could write a blog post explaining how new information could be added to libosinfo (the library Boxes relies on for information on various operating systems and their installer medias) so here I'm doing just that. Currently there are two types of information you can add, devices and operating systems. Usually, it'll be the latter that you'd want to add (e.g your favorite OS just made a new awesome release and you want libosinfo to know about it) but for the sake of completion, I'll describe both.

Libosinfo keeps its information database in a bunch of XML files. Although theoretically there could be just one XML file but that would have to be really huge and therefore will be very hard to edit/maintain so we keep each OS distro and device class in its own XML file.

Libosinfo recursively traverses the following locations, assuming application let libosinfo load its own default DB (which at least Boxes does):
  • ${pkgdatadir}/libosinfo/db, where pkgdatadir typically is ${prefix}/share. This can be modified at runtime by setting OSINFO_DATA_DIR environment variable to whichever path you got the custom DB.
  • ${sysconfdir}/libosinfo/db, where sysconfdir typically is ${prefix}/etc or /etc.
  • ${HOME}/.config/libosinfo/db
So if you just want to quickly add some information to libosinfo, the easiest way is to put a file under ${HOME}/.config/libosinfo/db folder (you'll have to create it yourself) with any name but extension must be 'xml'.

The schema of these XML files is pretty straight-forward so just looking at the existing XML files under data/devices and data/oses in the libosinfo source tree will already tell you mostly everything you need to know about the schema.

    Adding a new device


    Before you do that, you'll need to gather following data about the device in question:
    • Type: Qemu or virtio. If its not the latter, its the former.
    • Bus type: usually USB or PCI.
    • class: video, audio, block, input, net, watchdog, filesystem and memory.balloon are currently recognised values.
    • vendor name and ID
    • device name and ID
    The last two you can find from http://www.linux-usb.org/usb.ids or http://pciids.sourceforge.net/v2.2/pci.ids, depending on which bus type device uses. Once you have all this information, you simply add an entry to either your custom XML file or the appropriate file under data/devices/ in libosinfo repository like this (I failed to find a way to embed raw XML here so I converted it into something XML should have looked like):

      (device id="http://pciids.sourceforge.net/v2.2/pci.ids/10ec/8029")
    (name)ne2k_pci(/name)
    (bus-type)pci(/bus-type)
    (class)net(/class)
    (vendor)Realtek Semiconductor Co., Ltd.(/vendor)
    (vendor-id)10ec(/vendor-id)
    (device)RTL-8029(AS)(/device)
    (device-id)8029(/device-id)
    (/device)

    the 'id' is created simply by combining the URL of the appropriate ID database (one of the URLs I mentioned above) with vendor and device IDs.

    Adding a new OS


    This one is better explained by showing you some real examples:

      (os id="http://fedoraproject.org/fedora/17")
    (short-id)fedora17(/short-id)
    (name)Fedora 17(/name)
    (version)17(/version)
    (vendor)Fedora Project(/vendor)
    (family)linux(/family)
    (distro)fedora(/distro)
    (codename)Beefy Miracle(/codename)
    (upgrades id="http://fedoraproject.org/fedora/16"/)
    (derives-from id="http://fedoraproject.org/fedora/16"/)
    (/os)

    The 'id' here could really be just anything you like but if you adding a new variant/version of an OS to an existing file of the appropriate family, its good to follow the conventions being followed in that file. Same goes for 'short-id'. The 'upgrades' and 'derives-from' are optional entries. While former is not really used much for anything useful yet, the latter is meant to avoid some duplication.

    The most common example of such duplication is list of devices supported out of the box by the OS in question. Notice that we didn't list any devices in the example above. The reason is not that Fedora 17 doesn't support any devices but rather that it inherits all device support from its parent and grand parents. To list devices supported by the OS, you add simple entries like this:

      (os id="http://fedoraproject.org/fedora/17")
    ..
    (devices)
    (device id="http://pciids.sourceforge.net/v2.2/pci.ids/1b36/0100"/) (!-- QXL --)
    (device id="http://pciids.sourceforge.net/v2.2/pci.ids/8086/2415"/) (!-- AC97 --)
    (/devices)
    (/os)

    Now in this case, 'id' elements must match an ID of either an existing device in libosinfo's default database or a device you have added in your custom database. If your OS supports the above list devices for example and you don't list them here (or under any parent OS), applications like Boxes might not add these devices to virtual machines they create and you'll end-up with very crappy graphics and no sound in your VMs created for the OS in question.

    Another important piece of information is resource requirements and recommendations. Its rather straight-forward as well:

      (os id="http://fedoraproject.org/fedora/17")
    ..
    (resources arch="all")
    (minimum)
    (n-cpus)1(/n-cpus)
    (ram)671088640(/ram)
    (storage)94371840(/storage)
    (/minimum)

    (recommended)
    (cpu)4000000000(/cpu)
    (ram)1207959552(/ram)
    (storage)9663676416(/storage)
    (/recommended)
    (/resources)
    (/os)

    'arch' attribute is usually just 'all', unless the OS in question has different requirements/recommendations for different architectures. The units for cpu, ram and storage are Hz and bytes respectively.

    One last piece of information you really would want to add is about the installation and live media. While in future we might use it even for things like presenting downloadable OSs in Boxes (and other apps), for now we use this information mainly to detect the OS (along with other properties) given a media (ISO, USB stick or CD-ROM). Here is how that looks like:

      (os id="http://fedoraproject.org/fedora/17")
    ..
    (media arch="x86_64")
    (url)http://download.fedoraproject.org/pub/fedora/linux/releases/16/Fedora/x86_64/iso/Fedora-16-x86_64-DVD.iso(/url)
    (iso)
    (volume-id)Fedora 16 x86_64 (DVD|Disc)(/volume-id)
    (system-id)LINUX(/system-id)
    (/iso)
    (kernel)isolinux/vmlinuz(/kernel)
    (initrd)isolinux/initrd.img(/initrd)
    (/media)

    (media arch="i686" live="true")
    (url)http://download.fedoraproject.org/pub/fedora/linux/releases/16/Live/i686/Fedora-16-i686-Live-Desktop.iso(/url)
    (iso)
    (volume-id)Fedora-16-i686-Live(-KDE)?(/volume-id)
    (system-id)LINUX(/system-id)
    (/iso)
    (kernel)isolinux/vmlinuz0(/kernel)
    (initrd)isolinux/initrd0.img(/initrd)
    (/media)
    (/os)

    The 'live' attribute means (as you guessed it) a media that can be simply booted for user to try the OS without having to install it first. If the media in question does not provide an installer at all, you want to explicitly specify 'installer' attribute with value 'false'.

    The data under 'iso' element is what enables us to detect the media. You can get this information from a media using `isoinfo -d -i /path/to/iso/or/devicenode` command. I should make it clear at this point that values of 'volume-id' and 'system-id' nodes are not exact copies of the actual volume and system IDs but rather a regular expression.

    If you are adding this information to libosinfo's default database and hope to contribute this upstream, we'd very much like you to add this information also to our tests (you don't want us to break support for your favourite OS at some point, do you?). Its very easy, you just put the output of the isoinfo command I mentioned to a file named $FILENAME_OF_YOUR_ISO.txt under test/isodata/$DISTRO/$SHORT_ID_OF_OS/ in the source directory.

    As you probably guessed it, the 'kernel' and 'initrd' are completely optional and you only need to specify it for Linux-based operating systems. If you are adding information about a proprietary OS, we probably also need to skip the 'url' element.

    Thats it! Happy hacking!

Syndicated 2012-06-14 22:43:00 (Updated 2012-06-14 22:47:06) from zeenix

314 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!