Category Archives: Applications

The king is dead, long live the king!

As we here at rPath are trying to embrace standards [1], I got to work on CIM again. Kind of a deja-vu since, in a previous life, I started to write Cimbiote – a way to write CIM providers in python.

Cimbiote did not go anywhere in the past 2 years and a half, so I dusted it off and started to play with it. As it turns out, major pieces were missing: the ability to create references, support for associations etc.

When trying to add reference support, I found out from the sblim mailing list that there is still hope in the world. Today I finished packaging cmpi-bindings=contrib.rpath.org@rpl:2 and wrote a simple plugin that does not do much, but was enough to prove far superior to cimbiote.

[1] You, in the back row, stop chuckling. We all know that standards are wonderful things, as Tigger would say.

VIM tip of the day

An operation I happen to do a lot:

Given a list of words spread on separate lines, sort the words.

One can try to do :sort or !sort on a range, but that will sort the lines, not the words inside the lines.

Easiest I found so far (but requires visual formatting which is only available in vim):

  • visual select of the lines you want to sort
  • !!fmt -1
  • visual select of the lines you want to sort
  • :sort
  • gw}

Clear as mud :-)

Explanation:

! will run the selection through an external program, in this case fmt (which is a Unix command to format a list of lines). -1 says to format with a text width of 1 character (which effectively breaks the words at the space)

:sort will sort the selected lines

gw} will format from where the cursor is to the end of the paragraph (re-joining the lines).

ext2online is gone

I used to use ext2online in conjunction with LVM whenever I had to resize a partition that was already mounted. I haven’t had to do that in a while, so I was surprised that I couldn’t find ext2online anymore.

Turns out more modern versions of resize2fs already know how to do that. Not the ones from e2fsprogs=conary.rpath.com@rpl:1, but I was able to install e2fsprogs=conary.rpath.com@rpl:devel into a temporary root and run the new resize2fs from there. Yay.

Adventures with SCons

I’ve been playing with SCons for the past couple of days. It’s intended to be a replacement for Make, and probably sounds similar enough with Ant or Maven, for those familiar with these tools from the Java world.

It’s pretty powerful in that it lets you use the boilerplate builders or you can build your own builders (and nodes!) too. It also allows you to write custom “freshness checks”. make usually verifies if a node is out of date by comparing the timestamps for the source and target nodes. This can get you in trouble when using CVS, for instance, because clocks are not synchronized. It’s also not very useful when what you build doesn’t live on the filesystem.

I will post some examples  shortly. I am currently creating nodes for Mercurial checkouts and they work pretty well. CVC (Conary) nodes will follow shortly.

And yes,  it’s written in Python…

What I’ve been up to

It’s been a while since my last post, so here’s what’s been going on.

  •  Very busy working on Conary (though still not making progress fast enough through my issues list).
  • Speaking of that, I’ve reached the respectable 6 months with rPath.
  • Moved over the weekend.
  • Packaged gnucash 2.1.0 – and hit some guile issues in the process. Hopefully will finish tomorrow.
  • Does “April 17th” tell you something?
  • Before moving, a bunch of repairs made – that was all my spare time went.
  • Ran an orienteering event at the Schenck forest (and I missed a bunch of controls). Got to cross a 20-ish-ft river over a rotten log 3 times before the heavy rain started. I was completely soaked when I finished. But it was fun.
  • Did not run as much lately because of my evenings being “a different workout”.

The Mercurial Plugin for Jira (or Read the Code, Luke)

As Matt (the author of the Mercurial plugin for Jira) pointed out in his comment, there was an issue with the permissions for the plugin. Seemingly random people were able to see the Mercurial Commits tab, and all along I thought I messed something up when I ported the plugin from Jira 3.6.2 to Jira 3.6.5 and then to Jira 3.7. (Yes, I know Jira 3.8 is out, we didn’t schedule the migration yet).

Lately I’ve been busy closing bugs in Conary land, and haven’t got the time to go back and investigate what’s going on. Last week I finally decided I should look at the code – and it became very obvious. There is a View Version Control permission that controls who can see what, and it turned out only several groups were granted that permission. We’ve only allowed access to commits to internal users for now, but that may change in the future.

Also, yesterday I noticed that Jira was not indexing the Mercurial repositories anymore. As usual, catalina.out is full of useless messages, so reading the code again pointed out that I got the configuration wrong. Funny it did work at all. Turns out hg.clonedir.idx is indeed supposed to be the top directory where your Mercurial clones are, and not the directory where you cloned the repository. That is derived from the URL. Doh!