pythonaro.com

Pythonaro blog

29 June 2009

Earth to VmWare: make some DEBs, please

I've recently installed VmWare Server on a new box. For some reason, VmWare packages RPMs but not DEBs, so I had to do a nonstandard local install from the generic .tar.gz installer. That's not difficult, but now there is no way for me to track updates, including security-related ones.

Come on VmWare, get your act together: it's 2009, people expect this sort of feature these days. Since you bother to build RPMs, it's clear that you can package stuff properly if you want to. If you are not sure what distribution to pick in the sea of available Debian-clones, just track Debian-stable and let the community do the rest.

Labels: , ,

posted by GiacomoL @ 1:40 PM   0 comments links to this post

05 October 2008

Horrible Hack to get Python 2.6 on Debian or Kubuntu

I wanted to try out the newly-released 2.6 version of our beloved Python, but unfortunately Debian didn't have a package for it yet (and it still doesn't). I wasn't too afraid of screwing up my laptop, as it's probably going to be formatted very soon anyway, and I didn't want to mess around with deb build scripts, so this is what I've done:

  1. got the official source distribution, untarred and cd in the resulting dir Python2.6
  2. got some additional packages: apt-get install tk8.4-dev libgdbm-dev libdb-dev libreadline-dev libsqlite3-dev libncurses5-dev (and possibly a few others)
  3. ./configure --prefix=/usr --enable-ipv6
  4. make
  5. checkinstall -D --pkgname=python2.6 --pkgversion=2.6 --maintainer=g.lacava@gmail.com --inspect --backup=yes --install=no make altinstall
    This command allowed me to review the package contents and remove what I didn't need, which is basically everything outside the "python2.6" directories and which might already exist on my system (so I didn't want to overwrite it).
    I took out the lines /usr/bin/pydoc, /usr/bin/idle and /usr/share/man/man1/python.1
    UPDATE: when checkinstall asks if you want to create a default set of docs, say "yes", or you might get an error about ranlib further down (see comments).
  6. installed the produced .deb package
  7. copied back pydoc and idle (from the build directory) and /usr/share/man/man1/python.1 (from the Misc directory), all with "2.6" appended. I then set up alternatives with update-alternatives --install symlink name alternative priority (mainly in order to "redebianize" my impure karma); UPDATE: well, using alternatives (a 100% Debian solution which works perfectly well for loads of other multi-version script engines) will break your system, because some developers absolutely must reinvent the wheel every 5 minutes and then proudly announce that bugs won't be fixed. The stupidity of it all is staggering.

First impressions: 2.6 seems fast as hell. I don't know if this is due to the custom compilation though, rather than improvements in the runtime.

Labels: , , ,

posted by GiacomoL @ 2:14 PM   13 comments links to this post

13 May 2008

KDelicious 3.2.1 is out

KDelicious 3.2.1 is a minor update, released in order to distribute the translations kindly provided by users (German, Spanish and Dutch, plus the original Italian and English). And obviously, the day after I released, a new translation (French) was sent... I'll probably push it out next month, I'd rather not release every other week if I'm not going to add new features.

It's worth mentioning that about half the downloads are for the debian package now, and the total downloads have increased since last time. I wonder how hard it would be to package for SuSE (the most popular KDE distribution), maybe that would give it a little boost as well.

Labels: , , ,

posted by GiacomoL @ 3:17 PM   0 comments links to this post

17 December 2007

Things I learnt last week on Python, PyKDE and KDE

  • if PyKDE segfaults on you, don't despair: you are probably just using the wrong arguments for a method call. Get the right invocation and you'll be fine, no need for recompilation or other drastic measures.
  • KCmdLineArgs is cool!
  • how to use KConfig from python (saves so much time):
    conf = KConfig("your_rc_file") # ends up in $KDEHOME/share/config/
    conf.setGroup("yourgroup")
    conf.writeEntry("your_option","your_string")
    # non-string values DON'T work
    conf.sync() # this will actually write out the stuff
  • KIO.NetAccess can save a lot of trouble storing passwords etc., seamlessly integrating with konqueror and kwallet
  • distutils is cool, in its own way. PyPi integration looks terrific, can't wait to upload my stuff there...
  • dependency checking in distutils still sucks. Either you go with setuptools, or you have to litter your setup.py with ugly import tests.
  • kdedistutils (from pykdeextensions) looks useful enough
  • the KDE TechBase is very good for KDE4. For KDE3, better to get the kdelibs-apidoc packages in your distro. Don't understand why (on Debian Etch) it doesn't register with QtAssistant.
  • Google Translations can be weird.

I'm very close to releasing "KDelicious 3.0", which is a big improvement on pykeylicious. While adding a few "simple" options to manage how del.icio.us bookmarks are imported into Konqueror, I tried to refactor out nontrivial code from the main script into modules, and added a GUI to manage these options. I also pushed the integration with KDE in order to do things like transparent proxy support and kwallet integration, which spared me from maintain connection code, passwords, etc... I ended up with several files to distribute, which required a "proper" installer.

This release will still use the kdialog hacks. I'll get rid of them in 3.1, because I really want to put this out before the end of the week and get some feedback.

On bookmark synchronization: in an ideal world, synchronization would be done in the background, if we are online, every couple of hours, and by just pulling the more recent posts. But this is a bad world, and I'm a bad coder... KDelicious will only synchronize manually, will download all your bookmarks each time it runs, and will just try to stop you from getting banned by del.icio.us if you launch it too often. The only way around this would be to write a KService or a systray applet (which would also allow me to support other "minor" browsers like Opera), but this stuff is changing in KDE4 so I don't want to spend time on it before march.

After Christmas I'll think about putting the code on sourceforge (or savannah, or something) and have a proper homepage for it. But first, let's release ;)

Labels: , , , , , , , , ,

posted by GiacomoL @ 2:46 PM   0 comments links to this post

22 June 2007

Linux reloaded

Linux users are fiddlers.

They like to poke stuff, prod around, fix this and that, curious like little monkeys. They can be extremely individualistic, never satisfied by someone else's solution, willing to customise the very last bit of everything.

That's why there's such a plethora of Linux "flavours" on the net: every taste is catered for by a niche community of fellow fiddlers. It's quite a rare event when one distribution emerges as a major player, calling to itself a wide number of sysadmins, developers, hobbyists and other variegated humanity. It's even rarer to see a not-for-profit enterprise gain and maintain such a high level of quality and success through the years, instead of waning and eventually fold or "sell out" to market forces.

Debian and Gentoo are two of a kind. Apparently very different in their approach to technical issues, they actually manage to channel their developers' and users' geeky enthusiasm in something bigger, thanks to explicit and implicit ideological premises which look much more similar than what their communities might think.Gentoo is the ultimate fiddlers' choice. The implicit philosophy is rooted in believing the user must have total and complete freedom with their software, without being obstructed by the distribution developers in any way. Absolutely everything is “tweakable”, as close to the metal as possible, as faithful to upstream sources as possible. You can rebuild an entire system literally from scratch, modifying every flag, every variable that you care of (and more) and still end up with a configuration which will (usually) allow for easy maintenance and upgrade; applications will look and work pretty much as their original developers intended, with very little distribution-specific glue.

The problem of this approach is that there is no opt-out. Very few packages have a pre-built binary, and even then switching between binary versions and regular ones is not really foolproof. This means long compilation times, and a more stressed hardware overall. The community is a bit more anarchic than the average bunch of Linux geeks (if possible) and efforts to institutionalise it resulted in alienating several key developers, and accusations of getting too close to the disparaged "political" model followed by Debian. The original founder moved on (to Microsoft, the enemy!), then dwindled back to find its child creature having changed too much for him to bear. It's not clear if Gentoo will "still matter" in a few years.

Debian started in a similar way (much earlier than Gentoo), but slowly settled on a very different philosophical stance. If Gentoo's credo is "as bare as possible", Debian wants to be "as perfect as possible"; Debian developers won't release sub-par solutions, systems that (might) fail to deliver, even when the alternative is to not release anything at all. They'd rather think something through, to come up with ideas which are rational and solid, than to introduce short-lived hacks that might, one day, wreck your system or embarrass the developers.

This philosophy produced what is currently regarded as the best software packaging system ever deployed (dpkg/APT), which manages to be both extremely simple for users to adopt, and extremely flexible for developers to customise. It also resulted in the biggest software repository ever maintained, with thousands of packages available for dozens of supported architectures, whose maintenance is an extremely challenging task by itself.

This also reflects in Debian's social stance, which is both more logical and radical than any other distribution. While Linux vendors will usually play in a very grey area, mixing commercial and not-for-profit interests (with very little safeguards for both parties), the original Debian community unapologetically chose to always guarantee the interests of not-for-profit initiatives (and the rights of end-users) over corporative greed.

While Linux communities usually favour informal structures and processes, Debian developers laid out a complex (and often Byzantine) system to guarantee that participation be open to everyone on a fair basis, and that solutions be transparently chosen in democratic ways.

The problem of this approach is that, in the very apolitical geek community, it can look very slow and "untidy". Lists and forums are prone to flame wars and politicisation, slowing the pace of development. Zealotry, that very human phenomenon which routinely appears as soon as social laws are drawn, runs wild in the non-technical elements of the community, sometimes forcing it to introduce unpopular changes (if extremely logical ad precise).

Recent examples of this behaviour include the year-long license "purge" (dozens of packages were removed from the repository or forced to explicit their license as GPL), the ABI migration (a change in the GCC compiler which required all packages to be rebuilt or modified, delaying release of the 3.0/"Sarge" release) and the fight with the Mozilla community (which, after becoming a corporation, challenged Debian's independence in handling their sources, to which Debian developers replied by ditching the official Firefox/Thunderbird names and logos in their builds, replacing them with ironic Iceweasel/Icedove counterparts -- a move, they say, which was then technically obligatory on legal grounds). These were all but uncommon events for Linux distributions, however only Debian managed to choose the most unpopular ways to resolve them... because they were, strictly speaking, the most radical and logical as well.

This "infrastructural" work (both legal and technical) allowed Debian to eventually emerge with two major releases in a relatively short frame, and a very good outlook for the future; while all distributions experience a shrink of efforts based on their codebase, Debian produced a spin-off that emerged as possibly the most popular distribution for non-geeks (Ubuntu), the revolutionary "LiveCD" approach (pioneered by Knoppix), and went on to become the de-facto standard for new efforts.

...

This post started with the idea of explaining why yesterday, on my laptop, I switched from using Gentoo back to Debian. Having experienced Gentoo for a year, I grew a bit tired of huge compilation sequences; moreover, the pace of changes and breakages in the "portage" package repository is currently very high. I used to rave for the latest and greatest version of each application, but now I find that 99% of my requirements are well catered for by year-old software. So I moved to Debian's stable release (4.0/"Etch"), whose rock-solid quality I already know. I used to run the unstable "Sid" branch, but I no longer need bleeding-edge stuff, neither need I heavily tweak a system in order to make my laptop devices work, which was the experience that had led me to Gentoo. I know that the Debian community is massive, and there are thousands of support resources on web and IRC, so I'm confident that, should I have a problem, somebody will know the solution already. And I know that I'm running software with a social purpose, to which I can contribute something back without feeling that I'm just being used for cheap labour.

Is this a sign that Linux is finally mature, stable, and ready for the masses? Or it's just that I'm getting old?

For sure, I’m still a fiddler; and that’s why I still run Linux.

Labels: , , ,

posted by GiacomoL @ 9:17 AM   0 comments links to this post