The House of Bits

Just another weblog with some thoughts.

Getting `repoze.who` and Pylons working together

Finding an authentication middleware for Pylons was quite a challange, because the most advertised middleware (AuthKit) didn’t really work. At least I didn’t manage to get it to do what I wanted. On Pylons IRC channel someone suggested to take a look at `repoze.who`.
Read the rest of this entry »

Pacman Making It Explicit

After getting hibernation to work, I accidentally rebooted to a previous state that had been left in the swap space. It pretty much trashed my filesystem. So, I wanted to reinstall all packages and somehow managed to reinstall them all as dependencies. To restore explicitly installed ones there should be a possibility to run # pacman -S --asexplicit <PACKAGE>, but for some reason it isn’t implemented in pacman v3.1.3.

So, I whipped up a quick hackish shell script to accomplish the task. Maybe someone with a similar problem will find this useful. But be warned, if something goes wrong, don’t blame me.

#!/bin/bash
# File name: pkg_explicit

if [ -z "$1" ]; then echo "Usage: $0 [--restore] <PACKAGE>"; exit 1; fi

RESTORE=0
PKG_NAME=$1

if [ $1 == "--restore" ]; then
	RESTORE=1
	PKG_NAME=$2
fi

PKG=$(pacman -Q $PKG_NAME 2> /dev/null)

if [ -z "$PKG" ]; then echo "No suck package installed!"; exit 1; fi

PKG_DIR=/var/lib/pacman/local/$(echo $PKG | sed -e "s/ /-/")/

if [ ! -d $PKG_DIR ]; then echo "No such package installed!"; exit 1; fi

if [ $RESTORE -eq 0 ]; then
	if [ -z "$(pacman -Qd $PKG_NAME 2> /dev/null)" ]; then echo "Package already explicit!"; exit 1; fi
	cp $PKG_DIR/desc{,.rec}
	sed -i "/%REASON%/,+2d" $PKG_DIR/desc
else
	if [ ! -e $PKG_DIR/desc.rec ]; then echo "Nothing to restore!"; exit 1; fi
	mv $PKG_DIR/desc{.rec,}
fi

Meebo is actually purple

Meebo is a popular web-based multiprotocol instant messenger (IM) application and my one and only preference for accessing my buddy list when I’m not near my own computer or when I happen to be working in Windows. I had never ever thought of how did Meebo achieve the multiprotocol support it had, but I suppose I thought that they had done it all by them selves.

Today while surfing the Pidgin (formerly Gaim) website, I came across a page that introduced libpurple. To my greatest surprise the list of applications using it contained Meebo as one of them. Given the fact that Meebo has utilised libpurple quite nicely, I couldn’t help but to wonder what other interesting applications could be built upon it.

Read the rest of this entry »

SharpOS looks promising

Over a year has passed since the creation of SharpOS mailing list. I’ve not kept track with the messages there and the state of SharpOS for some time, but yesterday I got the time to have a peek at what has changed, and to my great surprise the project has been making nice progress.

The SharpOS Project is a community effort to write an operating system based on .NET technology, with a strong sense of security and manageability.

Read the rest of this entry »