I have never had a bruise like this from a cannula before.
Author Archives: Allan
Steins;Gate
Tweet
Four episodes into Steins;Gate and I still have no idea what it is about!
Terra Nova
Tweet
Going to watch the first episode of Terra Nova to see how sending people back before a massive meteorite strike is going to save humanity…
In Memory Of A Lawnmower
It is with great sadness I have to inform you of the passing of Ozito “Oz” Lawnmower (2006-2011). His tragic demise occurred a couple of months ago in a ball of blue electrical sparks, possibly as a result of exposure to rain… The case for criminal proceedings (negligent homicide) was investigated, but the current punishment of having to use a push mower to maintain the lawns has been concluded to be adequate.
I know what my readership wants to hear, so lets talk tech specs! Oz had a 1100W induction motor powered by 230V of electricity at 50Hz. He would cut at a maximum 3000rpm in a counter clockwise direction at the heights of either 31, 47 or 63 mm and with a cutting diameter of 320mm. All this while producing only 96dB of noise.
From his birth somewhere in China, Oz had a tough life. His first assignment was a relatively nice piece of lawn, but it came with the risk of a collapsing retaining wall and so he lived in fear of being horribly crushed. Luckily that assignment did not last long, but his second and final one was potentially much worse. Initially the new “lawn” he was sent to mow was nothing much more than a collection of weeds (including some that he just could not handle). This resulted in one of his wheels suffering from a mild detachment issue that required constant attention.
Just when his job was looking up due to the clearing and turfing of the entire lawn area, tragedy struck. His wheel came loose and went underneath his blade and was completely destroyed. Much searching was made for a replacement and the end of a drainage pipe was even being considered, when I was told by the helpful man at the hardware store that he had just the thing to fix it… a lawnmower wheel. And so, with the help of a hammer and a piece of wood, Oz got a new wheel attached and was looking forward to working until retirement on a nice patch of grass. Unfortunately, life was not so kind.
And so the tale of the life of Ozito comes to its end. He will be sadly missed.
Glibc Update
Tweet
Five hours gone and I am almost ready to push what was supposed to be a minor glibc update to the Arch Linux repos…
Pacman Package Signing – 3: Pacman
And on with the “final” component of the package signing saga… I have previously posted about signing packages and databases and managing the PGP keyring, which was all preparatory work for pacman to be able to verify the signatures.
In the end, most people will not notice pacman verifying signatures unless something goes wrong (at least once it is configured). You will see the same “checking package integrity” line, but instead of verifying the packages md5sum, the PGP signature will be checked if available. But implementing this required substantial reworking of the libalpm backend, with the adding of signature verification abilities through the use of the gpgme library, adding flexible configuration options to control repo and package signature verification, changes to how and when repo databases get loaded (so that we can error out early if the repo signature is bad), and the list goes on… The majority of this was done by Dan McGee, who is the lead pacman developer. In fact, looking at the git shortlog for this development cycle:
$ git shortlog -n -s --no-merges maint..
296 Dan McGee
128 Dave Reisner
124 Allan McRae
...
(followed by 18 other contributors with 11 or less commits each). So Dan takes the clear lead with about 50% of all commits in this developmental cycle, while the battle for second place remains intensely competed for!
So what have we ended up with? My opinion is ever so slightly biased, but I think we have ended up with the most complete and flexible package signing implementation yet. Most other package managers signature checking is simply a call to gpgv, which trusts any signature in your keyring. With the more complicated solution using gpgme, pacman has the complete concept of the web of trust, allowing for very precise keyring management. We not only sign packages, but sign databases too. Importantly, we can add expiry times to those signatures, which together prevents a malicious mirror holding back individual package updates or deliberately not providing any updates at all. As an aside, we also now protect against the “endless data attack” where an attacker sends an endless data stream instead of the requested file. Together that covers the most well reported avenues of attack on package managers (I hesitate to say “all” despite not knowing of any others because someone will prove me wrong!).
Onward to the actual use of signature checking in pacman. The main adjustment needed to be made is the addition of the SigLevel directive to pacman.conf. This can be specified at a global level and also on a per-repo basis. The SigLevel directive takes three main values: Required, which forces signature checking to be performed; Optional (default), which will check signatures if present but unsigned packages and databases will be accepted; and Never, which sets no signature checking to be preformed. More fine grained control can be added by prefixing these options with Database and Package and combining multiple options. For example, I have a local repo that has a signed database but not all packages have signatures. So I use SigLevel = Optional for my global default and add SigLevel = DatabaseRequired to enforce the database to be validly signed for that repo. Alternatively, I could use SigLevel = DatabaseRequired PackageOptional to explicitly achieve the same result. You can also specify the level of trust needed in a signing key using the TrustedOnly (default) and TrustAll options. The former will only accept a key if it is fully trusted by your PGP keyring, while the latter only requires the key to be present in the keyring (much like using gpgv).
As I wrote earlier, there is very little change from a users perspective once configured. About the only thing that is really noticeable is that pacman will attempt to download a signature for each database it downloads when the database SigLevel is set to Required or Optional. For example:
$ pacman -Syu
:: Synchronizing package databases...
allanbrokeit 1464.0B 540.5K/s 00:00:00 [######################] 100%
allanbrokeit.sig 287.0B 7.0M/s 00:00:00 [######################] 100%
...
Beyond that, the checking of PGP signatures occurs during the usual package integrity check stage so will go largely unnoticed unless something goes wrong. This is both a good thing (we all like pacman because of its simplicity) and a bad thing (as the large amount of work done here is not particularly visible to the user). So when everything with package are repo database signing just works for you, remember to thank your local pacman developer (and if it all goes wrong, it was not our fault…).
Games on Google+
While I have not actually posted anything on my Google+ account yet, I am fairly awesome at time wasting and that makes the addition of games there a fairly attractive prospect. We all know that these games are designed to make the publishers some money and demonstrate (a.k.a. take advantage of in order to make money…) the social aspect of Google+. However, I am not willing to pay money or be social… So, with those restrictions, here is opinions on the currently available games.
Zynga Poker – I like poker, so this game was the first I tried. The good thing about it is that you can use it as a completely free poker client and just play poker. All the extra social crap is optional and does not really get in the way too much. However, there are better poker clients out there with freeplay and they have many more players (I never got to play a “sit and go” match once due to lack of people to form a table). Also, I like to have more than one table running at a time or the waiting gets boring.
Monster World – This almost set of my “Gotta Catch ‘Em All” urge. But it had one fatal flaw. I planted my fields full of an expensive plant that takes 16 hours to grow. But there is absolutely nothing in the game to do while you wait for that 16 hours. So essentially the game is forcing you not to play the game, which I think amounts to the stupidest concept in game design ever.
Angry Birds – I have never really been a fan of this game so I did not spend much time playing it. While it appears that some parts of the game would require teaming up with friends, there is enough single player gameplay to keep you entertained for a decent amount of time.
Dragon Age Legends – This seemed like a game I would like, but I just could not enjoy it for some reason. I think part of my issue was with the graphics. I know these games are not supposed to be graphics powerhouses, but when limited in that department I often think you are better off going very simple and refined. Everything in this game, but especially the characters, just looked horrid.
Diamond Dash & Collapse! Blast – Both these games have the very annoying “feature” that you lose a life for each round you play. And these rounds only last one minute, so you very quickly run out of lives. At that point, the best thing to do is to shut down the game and wait for time to pass so that lives are replenished.
Crime City & Zombie Lane – Like the above games, but instead of running out of lives, you run out of energy and can not do anything. I also did not get what the fun was in Crime City. All you did was click your mouse on the green arrow and wait for a progress bar to fill up.
Bubble Island – I only played the first five or so level sets on this so never actually lost a life. But from what I can see, if I did fail it would require me playing previous levels 500 times to get a retry attempt. That is equivalent to locking you out of the game as far as I am concerned.
Wild Ones – Worms clone with dogs… and as far as I could tell, completely useless single player.
City of Wonder, Dragons of Atlantis & Edgeworld – I dislike any click a building, watch it build, research upgrades, real time strategy type game. And I can not imagine them becoming better with an inability to right click on anything…
Bejeweled Blitz – Meh, Bejeweled… but this is one of the few games where not being willing to pay or be social has very little effect.
Flood It – Puzzle game that I could not find where the fun was located.
Sudoku Puzzles – Not a game… I completed one board to see if there was some sort of side challenge or something to actually make this a game, but failed to see the game part.
Now that I have decided that all these games are basically crap, I would like to clear all of what I have done from the game providers server. But unless I am missing something, not a single game appears to have the option to delete your progress. This is a bit of a surprise given one of the main selling points of Google+ over its competition was the ability to completely control your information, but I guess that does not extend to third parties. So that information you gave the provider authorization to access at the start of the game is permanently in their hands. While Google appears to have done the good thing and allows you to revoke access to your information (under “Account Settings” -> “Account Overview” -> “Security” -> “Authorizing applications & sites”), in reality that will only stop access to new changes you make to your profile as the game providers will already have your data stored. I would be interested in seeing if deleting your Google+ account completely removed your scores etc from the people in your circles games.
Pacman Package Signing – 2: Pacman-key
In this second part of the ongoing series of articles about the implementation of package signing in pacman, I am going to focus on keyring management and the new tool pacman-key that is provided to help with this. You can read the previous entry covering makepkg and repo-add here.
The way in which the PGP keyring for pacman is managed will be an essential aspect of the security of your system. The keyring (in combination with configuration options for pacman itself), will control which package and database signatures that you trust and thus what packages get onto your system. In fact, I’m still not entirely sure how best to set-up the keyring in terms of importing keys and setting their trust levels as the only repo I currently use that has full signing is my own and for that I can just add my own key with ultimate trust. Adding my key with ultimate trust would not be ideal for other people to do, but then again it may be acceptable given it is in a keyring for pacman only. But this is more the social aspect of PGP signing so I will leave discussing that further to another time.
However the keyring is set-up, it is helpful to have a tool to manage it. While this could be done directly using gpg with the --homedir flag, there are a few pacman specific keyring management issues that warranted the creation of a separate tool. Enter pacman-key. Originally this was a port of Debian’s apt-key to pacman by Denis A. AltoĆ© Falqueto, but has slowly become closer to being just a gpg wrapper with additional functions. I’ll also add a shout-out to both Ivan Kanakarakis and Pang Yan Han who also contributed multiple patches towards this script and Guillaume Alaux who provided the initial man page.
The pacman keyring will be located (by default) in /etc/pacman.d/gnupg (although this can be adjusted using the GPGDir directive in pacman.conf). The keyring should be set-up using pacman-key --init to ensure the files have the correct permissions for full pacman signature checking functionality. For example, to verify package signatures as a user (e.g. using pacman -Qip <pkg>), we need to let the user have read permissions on the keyring files and also add a gnupg configuration file to prevent the creation of a lock file (this is currently required to be done globally as the gpgme library used by pacman does not have the ability to control lock file creation…).
Keys can be added to the pacman keyring in several ways. They can be imported from a local file or files using pacman-key -a/--add <file(s)> or from a public key server using pacman-key -r/--receive <keyserver> <keyid(s)>. You can also --import entire sets of keys and trust dbs from other gnupg keyrings you have. Keys are removed using the -d/--delete option. There is also a mechanism for a distribution or other repo provider to supply a keyring containing all their packagers’ PGP keys to be imported into the pacman keyring, but this area is still undergoing development.
Once you have some keys in your keyring, you can manipulate them using pacman-key and some standard gnupg flags including --edit-key, --export, --list-{keys,sigs}, etc. The --edit-key option is fairly important as it allows you to do things like adjust the trust levels or locally sign keys in the keyring, which builds our web of trust. For any more advanced manipulation of the keyring (or just something that is not wrapped by pacman-key), you need to use gpg directly (although I am sure that if it turns out that a commonly used command is not currently wrapped by pacman-key, it can be added on request…).
And that is basically all there is to the pacman-key tool. It is fairly simple but it is also the part of the package signing implementation that has probably received the lowest volume of testing as it is not a script that will be used everyday. If you would like to help test it out while not touching your system pacman, you can build and run it directly from a git checkout. This should get you there:
$ git clone git://projects.archlinux.org/pacman.git
$ cd pacman
$ ./autogen.sh
$ ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
$ make -C scripts
$ ./scripts/pacman-key
Test initializing a new keyring, adding and removing keys, editing a keys trust level, verifying a file with a detached signature (many packages in the Arch repos are already signed) and report any issues you run into.
Poker Permissions
Tweet
Why do I have to give the poker game on Google+ permission to see my profile, email address and circles before I can play it?
MBP Fan Daemon Update
For those using my simple MacBook Pro fan daemon, you probably want to check that it still works… At least on my system, the location of the core temperature measurements have changed from /sys/devices/platform/coretemp.{0,1}/temp1_input to /sys/devices/platform/coretemp.0/temp{2,3}_input. I think this occured with the update to Linux 3.0 (but I am too lazy to confirm that is the actual update to blame…).
If you also have this change, you can grab an updated version of the daemon here. As always, it is only tested on my machine (MBP 5.5 13″), so it may not work anywhere else without adjustment…