user-avatar
Today is Wednesday
February 22, 2012

Archives: September 2008

September 27, 2008

Django browser for Redmine database

by Thomas Capricelli — Categories: Admin, Django — Tags: , 6 Comments

Do you know redmine ? This is, to my knowledge, the best project manager you could ever find out there. I like to describe it as ‘trac done well‘. It has only one, big, ugly, fat inconvenient for me : it is written on top of ruby on rails. I could tell you how slow it is (true), or how many security flaws are found everyday in the ruby/rails world. But the real reason I’m actually really concerned about ruby/rails is that I don’t know ruby. When I look at the code I don’t understand anything, and I can’t change something to ‘suit my needs’, as is so common in Free Software.

I wish it was written in Django.

Well, anyway, I spent some times today to create a small Django application in order to display stuff from the redmine database. For this, I’ve used the wonderful “inspectdb” feature of Django, which access a database and creates the (Django) models required to access it.

Then, I had to ‘adapt’ those models and to create an admin.py file so that I could browse (and even modify) the database from django.

Adapting meant:

  • removing all the “id” field, they are automatically created by Django and it seems rails use the very same name (“id”) so this is compatible.
  • Change the “obvious” references to other model from IntegerField to ForeignKey
  • Some models reference themselves, you need to use a ForeignKey to ‘self’ (including quotes) to do that.
  • add some __unicode__(self) for the most important/obvious models

The admin works was basically about:

  • Creates Admin objects for all models (thanks vim’s macro!)
  • add list_display / list_filter args for the most important ones

And the remaining problem is :

  • It seems Boolean from ruby/rails have the values ‘t’/'f’ while those from django have 1/0 (fixed since then)

Mandatory screenshot (corresponding to the public stuff from http://labs.freehackers.org):

Example of djangoredmineadmin in use

Link to the project homepage

September 26, 2008

KDE 4.1.2 tagged, gentoo land frozen

by Thomas Capricelli — Categories: Gentoo, KDE26 Comments

I’m not a gentoo fan. Mainly because I don’t like the idea of being a ‘fan’. Being a fan in the Free Software world usually means being an extremist and i hate extremism.

I nonetheless use almost exclusively Gentoo on all computers, laptops, servers and other divx boxes I have or maintain. That means a lot of them and it makes my Debian friends laugh. Who cares ? I use Gentoo and Free Software because I find this convenient, and I like the ideas behind them.

Yet I don’t share the optimism of people who think that gentoo is growing. On July 29th, KDE 4.1, the first almost-usable KDE version since the 3.5 branch, has been released, and since then, guess what have happened in the gentoo-KDE land ? Nothing. By nothing I mean first that not a single ebuild, even masked, even hard masked, has reached the official portage tree, and secondly, that despite the huge KDE user base in Gentoo, not a single official statement has been done concerning this issue. Because, believe me or not, there is an actual issue. Nothing was said on the main Gentoo page, almost nothing on gentoo planet (only one post focused on whether KDE should install in a different place or not). In the gentoo land, everybody speaks about everything but KDE in gentoo. Has the meaning of ‘g’ in gentoo recently changed ?

When you try to know a little bit more about this, it’s getting worse. Rumors are that developers have fought each others and the KDE team is just no more. It’s a new KDE team that is here for whatever reason (to which, by the way, I send my very best support, for the development of new ebuilds, for being put under such light/pressure, and for being sent in this lion’s cage that seems to be gentoo devs). I don’t know anything about this, but it’s not the first time I hear about huge tensions between gentoo developers, and this worries me a lot.

I don’t want politics, I want developers, I want Free Software developers. If I wanted politics, I would have gone for Debian, which, by the way, have had packages for KDE 4.1 and 4.1.1 for long.

Growing is not something easy to handle. It seems to me that KDE has managed to do this very well : a lot of work has been done in the few last years to ‘scale up’ and I think they managed to do this hugely needed step. Gentoo still has to improve a lot in this area. As a user, my expectations are the same as what you can read everywhere : transparency, transparency and transparency.

I love gentoo, i can understand a lot of things, I can wait, I can deal with human resource shortage, I could even help. I’m used with all of that because that is so common in Free Software and that is part of the deal. But I can’t bear darkness and closeness.

I will not conclude by threatening to leave for another distribution. I’m most than happy with gentoo as a distribution and I will keep on using it as long as it is possible. I have a KDE checkout anyway on my main computer. If things are going worse though, I’m not sure I will dare trying to work on the ebuilds.

I’m ready to ignore the “If you’re not happy with gentoo leave it” type of comments.

September 16, 2008

About mercurial and permissions

by Thomas Capricelli — Categories: Admin, Gentoo — Tags: , 1 Comment

Distributed source control is really great, and among them, the tool I love the most is, by far, mercurial. I use it for all my free software projects, my own non-software projects (config files, mathematical articles and such) and also, dare I say it, for my CLOSE SOURCE projects. Yes, I also do this kind of things, how harsh a world this is, isn’t it ?

In the latter case, though, I often have some problems with permissions. In my (quite common) setup, I have a central repository and the whole tree belongs to a (unix-) group. File access is restricted to this group only (chmod -R o= mydir).

On lot of current linux distribution, each user has an associated group with the same name (john:john), at least that’s how it behaves on both debian and gentoo.

When a user does a push which creates some new directory/file, then those are created as belonging to this user and its main group (john:john here). As a result, other people can not access to it, and when you want to pull the repository, you got a big ugly crash:

pulling from ssh://foo@freehackers.org///usr/olocal/hg/topsecretproject
searching for changes
adding changesets
transaction abort!
rollback completed
abort: received changelog group is empty
remote: abort: Permission denied: .hg/store/data/myfile.i

Of course, i can create a big fixperms scripts in the repository, but then I need to start it each time the problem arises, which if each time someone creates a new file/di: this is far too often.

I thought about the set-group-ID (see man ls) and indeed it works. I dont know if this is the official way of solving this problem among the mercurial communauty, and I would love to know if some other people solve it differently. At least that’s how it is documented on the mercurial site.

Now, you might as well find out about this problem once your repository has been used for a while and is already full of useful stuff. Then it is a little bit less simple than what the mercurial documentation says. Namely, you need to put the set-group-ID in the whole .hg/store/data :

cd topsecretproject/
chown john:topsecretgroup -R .
chmod g=u,o= -R .
find .hg/store/data -type d  | xargs chmod g+s
chmod g+s .hg # needed for .hg/requires

September 13, 2008

Konqueror web shortcut for gentoo packages

by Thomas Capricelli — Categories: Gentoo, KDE — Tags: , , 9 Comments

You’re going to think that I’m some kind of web shortcut maniac, but I really think I’m not.

I’m using http://packages.larrythecow.org a lot, and only today did I think about creating a konqueror web shortcut to get there faster. I’ve called it ‘gt’ (for gentoo, yes, i’m that lazy), and the magic url thinguy is

http://packages.larrythecow.org/?v=search&s=\{@}

Now I can type “gt:kdebase-meta” in konquy or alt-f2 and feel ashamed in front of my debian friends whom I’ve been laughing at so much in the past because debian is slow to catch up with kde releases.

Today, several weeks after KDE 4.1 has been released, and 10 days after KDE 4.1.1 has been released, there is still no official ebuilds for the kde 4.1 branch. I know there are overlays, there are some heated bug-reports, blogs and even some unofficial status page about it, but still, kde 4.1 is not in gentoo, and it makes me feel really sad.

Yes, I know, it’s free software and I can do it myself. And then?

© 2012 Thomas Capricelli All rights reserved - Wallow theme v0.46.5 by ([][]) TwoBeers - Powered by WordPress - Have fun!