Skip to main content

the avatar of Flavio Castelli

a silhouette of a person's head and shoulders, used as a default avatar

UOF–OpenXML Translator

I was surprised the news that Microsoft announced UOF-OpenXML translator project with China. The goal of UOF–OpenXML translator :

"As part of Microsoft’s continued commitment to interoperability, Microsoft decided to work with CHINA Electronics Standardization Institute, Beijing Information Technology Institute, one of the co-creators of the UOF Chinese standard , Beihang University of Beijing and with other partners to create a Translator between UOF and Open XML and provide interoperability between the two formats in both directions. Microsoft is funding and providing technical architectural guidance for the development of the translator that will benefit millions of people who live in China."

In one sense, China is so important for Microsoft's further strategies.
It is time to do something about UOF plug-in for OpenOffice.org, isn't it?

The UOF-OpenXML project is available at http://uof-translator.sourceforge.net
.
The UOF-ODF project is available at http://odf-to-uof.sourceforge.net.


the avatar of Flavio Castelli
a silhouette of a person's head and shoulders, used as a default avatar

Achill?

Finally the wanted entry: I started running again. We had Murph the dog with us. He had to stop every now and then and forced us to stop as well (phew).

the avatar of Flavio Castelli
a silhouette of a person's head and shoulders, used as a default avatar

No Redback

Mouse speaking. Back from Australia. Was familiar to me. They should offer me new travel opportunities. It's getting a bit boring. They didn't even let me fight with the redback. At least I look more and more audacious with all the smears of dirt on my face. Antje in the meanwhile attended this cookery course and now she cooks strange stuff. I suspect she just doesn't do it properly. She told me that they had fits of cough while doing the course. She believes it was due to the amount of chili. I rather think they are just incompetent. And the poor visitor who just wanted to have a quick dinner nearly fainted over his meal. On Saturday I had to drink ouzo again. At least Antje got us some wine gums after the pub visit. It took her a while to win the fight against the sweets machine though.

the avatar of James Willcox

RPM Transaction Enhancements

One of the reasons I wanted to revive rcd was so that I could use it to play with some package management ideas I’ve been kicking around. One of these ideas is a way to reliably rollback changes made during an RPM transaction. That is, actually make RPM transactions transactional.

Recently, a colleague introduced me to device-mapper, a kernel system used for block device redirection. There is a really cool thing that uses it called dm-snapshot, which allows you to redirect all writes to a device into a separate device. What I would like to do is use this to store all of the changes made during an rpm transaction. I think it would just need a bit of patching so that it only stores the changes made by the rcd/rpm process (and children). If anything goes wrong, you can just trash the snapshot data and things are exactly as they were in the beginning. Of course, if it succeeds without problelms, you need to merge the snapshot changes into the original device. This is where things get fuzzy, as dm-snapshot does not have this ability. However, Mark McLoughlin has created a set of patches that add this feature as part of the Stateless Linux project. Sadly, the patches do not appear to be a high priority for the kernel guys right now, so I guess this approach will have to be put on hold.

In any case, a system for performing this rollback stuff would be ridiculously useful in general — not just for package management. It looks like it will be a little more than I can do by myself in a weekend hack, though, so hopefully someone else will carry the torch? :)

a silhouette of a person's head and shoulders, used as a default avatar

My rpmdb is back

Thanks to everyone who told me about the rpmdb backup in /var/adm/backup/rpmdb - I restored it and now everything is working beautifully.

a silhouette of a person's head and shoulders, used as a default avatar

Oops, I lost my rpmdb

Yesterday my computer started randomly rebooting when I was trying to install packages on my computer, so I booted from a live CD and ran resierfsck on my disk, which fixed a whole bunch of things. But now when I run rpm -qa I get a list of no packages - and running rpmdb --rebuilddb doesn't help. Fortunately smart query lists everything that is installed, so I'm pretty sure there must be some way to get the rpmdb back, but I can't find it. Help!

the avatar of James Willcox

Return of The Carpet

Red Carpet, that is. Yes, that Red Carpet. I’ve taken some time lately to give some love to our old friends rcd and rug (the original rug, not the rewritten one). First I got everything building on a modern distro (openSUSE 10.2). This took more effort than I thought it would, but eventually things worked well. After that, I set out to make rcd more usable with yum services. Here is a list of the main changes:


  • Add native yum support. I removed the ‘helix’ service support and replaced it with something that understands yum metadata. This means you can just do ‘rug sa repo_url name’ for any yum service. I used the excellent yum parser that Tambet wrote for the libredcarpet backend of zmd to accomplish this.

  • Remove channel subscriptions. Since yum services don’t provide multiple channels, subscriptions aren’t really necessary. They have been replaced with the ability to disable a service.

  • Add sleep ability. One of the main complaints against rcd was that it used too much memory. This was mostly because over time the heap would become fragmented. The ‘sleep’ feature avoids this by running the main rcd daemon only when necessary. After a period of inactivity (3 minutes by default), the main daemon replaces itself with a smaller daemon. This smaller daemon simply waits until a request comes in and launches the full daemon to respond.

With the above changes, rcd is once again a joy to use. I would like to get the GUI working again, but there is some kind of threading problem preventing it from running. I would also like to add ftp support, but that is not a top priority.

I know there are probably SUSE users reading this asking “Ok, sounds fine, but is it fast?”. While it may not be the fastest thing out there, I think you will be surprised at the results (I was). Here are a few simple benchmarks from normal usage scenarios:

First, lets look at the number of services I currently have added:


% rug sl
  1. | Service URI | Name
    —+———————————————————————————+——————
    1 | http://go-mono.com/download-stable/suse-102-i586?r… | mono
    2 | http://software.opensuse.org/download/FATE/openSUS… | fate
    3 | http://ftp.suse.com/pub/suse/update/10.2/?name=upd… | updates
    4 | http://download.opensuse.org/distribution/10.2/rep… | suse-nonoss
    5 | http://download.opensuse.org/distribution/10.2/rep… | suse-oss
    6 | http://packman.inode.at/suse/10.2?remote_only=1;na… | packman
    7 | http://software.opensuse.org/download/home:/cybero… | cyborg
    8 | http://software.opensuse.org/download/X11:/XGL/ope… | xgl
    9 | http://software.opensuse.org/download/Beagle/openS… | beagle
    10 | http://software.opensuse.org/download/games:/actio… | games
    11 | http://software.opensuse.org/download/Virtualizati… | virt
    12 | http://software.opensuse.org/download/home:/kraxel… | kvm

So 12 services, and the package count is almost 21000. 22500 if you also count the ones in the rpm database. How long does it take to load all of those?

Cold filesystem cache, daemon is sleeping:

% time rug ping > /dev/null
rug ping 0.17s user 0.02s system 1% cpu 13.735 total


14 seconds to respond isn’t terrible, considering the cold filesystem cache. Now that the kernel has it cached, though, how long does it take?

Warm filesystem cache, daemon is sleeping:
<blockquote

% time rug ping >/dev/null
rug ping > /dev/null 0.14s user 0.02s system 3% cpu 4.465 total

4.5, not bad. Definitely in the tolerable range, I’d say. Of course after the daemon is awake, commands respond immediately. That is maybe the only good thing about rcd being a daemon — subsequent commands are instant, where other tools (yum, smart, etc) have to load the package metadata again. Memory usage after rcd wakes up is about 28MB, so that is not too bad either (it is a little over 1MB when sleeping).

Packages for recent SUSE distros are available in the build service. It has had a hard time keeping up recently, though, so you may run into a problem or two with rug. Sources can be found in gnome svn in the yummy branch of the various modules (rcd, rug, libredcarpet).

Also, yes, I am sick sick person.