Unrar Bug

So I was recently scripting with the unrar tool and discovered something was wrong.

$ unrar t file.rar
UNRAR 3.80 freeware Copyright (c) 1993-2008 Alexander Roshal
file.rar is not RAR archive
$ echo $?
0

It was returning zero all the time, even when the file wasn’t a rar. This is obviously wrong but also makes it very unhelpful for using in scripting. Fortunately enough a mate on IRC discovered that his version did it correctly.

So I first download the existing SRPM and installed it:

$ yumdownloader --source unrar
$ rpm -i unrar*.srpm

Then I installed that and simply modified so I downloaded the latest version, created a RPM and installed.

I have submitted the a bug report to RPMfusion.

GPG Errors

Sometimes when you are installing RPM’s or Deb’s you will find yourself faced with GPG errors. Instead of ignoring them why not fix them!

Simply download the key by using the GPG tool:

gpg --keyserver pgpkeys.mit.edu --recv-key E6F33B6628973CC0

Then import that key into either APT:

gpg -a --export 010908312D230C5F | sudo apt-key add -

Or with RPM:

gpg --export -a 010908312D230C5F >key.txt
rpm --import key.txt

Simple!